dont gzip a gzip and .js.gz has contenttype javascript
This commit is contained in:
@@ -12,6 +12,9 @@ type GZipResponseWriter struct {
|
||||
}
|
||||
|
||||
func Can(r *http.Request) bool {
|
||||
if strings.HasSuffix(r.URL.Path, ".gz") {
|
||||
return false
|
||||
}
|
||||
encodings, _ := r.Header["Accept-Encoding"]
|
||||
for _, encoding := range encodings {
|
||||
items := strings.Split(encoding, ",")
|
||||
|
||||
Reference in New Issue
Block a user