mirror of
https://github.com/stashapp/stash.git
synced 2025-12-19 05:14:38 +03:00
Reenable gzipping, pull in statigz fix, fix proxy prefix (#2039)
Co-authored-by: peolic <66393006+peolic@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9a76b4cf11
commit
74fcaa9a3f
5
vendor/github.com/vearutop/statigz/server.go
generated
vendored
5
vendor/github.com/vearutop/statigz/server.go
generated
vendored
@@ -216,6 +216,11 @@ func (s *Server) serve(rw http.ResponseWriter, req *http.Request, fn, suf, enc s
|
||||
ctype = "application/octet-stream" // Prevent unreliable Content-Type detection on compressed data.
|
||||
}
|
||||
|
||||
// This is used to enforce application/javascript MIME on Windows (https://github.com/golang/go/issues/32350)
|
||||
if strings.HasSuffix(req.URL.Path, ".js") {
|
||||
ctype = "application/javascript"
|
||||
}
|
||||
|
||||
rw.Header().Set("Content-Type", ctype)
|
||||
rw.Header().Set("Etag", info.hash)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user