mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-29 00:55:51 +08:00
improve (static): attempt at statically compile everything - revamp
This commit is contained in:
@ -234,7 +234,9 @@ func FileCat(ctx App, res http.ResponseWriter, req *http.Request) {
|
||||
if contentLength != -1 {
|
||||
header.Set("Content-Length", fmt.Sprintf("%d", contentLength))
|
||||
}
|
||||
header.Set("Content-Type", GetMimeType(req.URL.Query().Get("path")))
|
||||
if header.Get("Content-Type") == "" {
|
||||
header.Set("Content-Type", GetMimeType(req.URL.Query().Get("path")))
|
||||
}
|
||||
if header.Get("Content-Security-Policy") == "" {
|
||||
header.Set("Content-Security-Policy", "default-src 'none'; img-src 'self'; style-src 'unsafe-inline'")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user