From 50d9191544cb747e89bbe44c893c5788168fef43 Mon Sep 17 00:00:00 2001 From: bel Date: Sun, 7 May 2023 19:36:30 -0600 Subject: [PATCH] whoops --- contenttype.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contenttype.go b/contenttype.go index ef00adb..535bbe8 100755 --- a/contenttype.go +++ b/contenttype.go @@ -82,7 +82,7 @@ func SetContentTypeIfMedia(w http.ResponseWriter, r *http.Request) { case ".gz": w.Header().Set("Content-Encoding", "gzip") v = "application/gzip" - if path.Ext(r.URL.Path) == ".js.gz" { + if strings.HasSuffix(r.URL.Path, ".js.gz") { v = "application/javascript" } case ".gif":