updated code comments formatting

This commit is contained in:
Gani Georgiev 2022-10-02 13:38:59 +03:00
parent a6cafd1ed7
commit d84e57174b
1 changed files with 4 additions and 4 deletions

View File

@ -216,16 +216,16 @@ func (s *System) Serve(response http.ResponseWriter, fileKey string, name string
disposition = "inline" disposition = "inline"
} }
// make an exception for specific content types and force a // make an exception for specific content types and force a custom
// custom content type to send in the response so that it can be loaded directly. // content type to send in the response so that it can be loaded directly
extContentType := realContentType extContentType := realContentType
if ct, found := manualExtensionContentTypes[filepath.Ext(name)]; found && extContentType != ct { if ct, found := manualExtensionContentTypes[filepath.Ext(name)]; found && extContentType != ct {
extContentType = ct extContentType = ct
} }
// clickjacking shouldn't be a concern when serving static files, // clickjacking shouldn't be a concern when serving uploaded files,
// so it safe to unset the global X-Frame-Options to allow files embedding // so it safe to unset the global X-Frame-Options to allow files embedding
// (https://github.com/pocketbase/pocketbase/issues/677) // (see https://github.com/pocketbase/pocketbase/issues/677)
response.Header().Del("X-Frame-Options") response.Header().Del("X-Frame-Options")
response.Header().Set("Content-Disposition", disposition+"; filename="+name) response.Header().Set("Content-Disposition", disposition+"; filename="+name)