mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Config: Allow CORS for fonts and CSS when using a CDN #3931
see https://www.w3.org/TR/css-fonts-3/#font-fetching-requirements Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -64,11 +64,8 @@ func WebDAVAuth(conf *config.Config) gin.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
// Block CDNs from caching this endpoint.
|
||||
if header.IsCdn(c.Request) {
|
||||
c.AbortWithStatus(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
// Set vary response header.
|
||||
c.Header(header.Vary, header.DefaultVary)
|
||||
|
||||
// Get basic authentication credentials, if any.
|
||||
username, password, cacheKey, authorized := basicAuth(c)
|
||||
|
||||
Reference in New Issue
Block a user