mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-18 10:53:31 +08:00
Update static.go
This commit is contained in:
parent
3f4e7615fb
commit
2cb4c8c1bc
@ -102,7 +102,7 @@ func (h *uiAssetsHandler) serveFile(w http.ResponseWriter, path string) (code in
|
||||
// http.DetectContentType is using https://mimesniff.spec.whatwg.org/ which
|
||||
// will not recognize application/javascript for security reasons.
|
||||
if strings.HasSuffix(path, ".js") {
|
||||
w.Header().Add("Content-Type", "application/javascript")
|
||||
w.Header().Add("Content-Type", "application/javascript; charset=utf-8")
|
||||
} else {
|
||||
w.Header().Add("Content-Type", http.DetectContentType(bytes))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user