diff options
-rw-r--r-- | web/web.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/web.go b/web/web.go index 228a1219a..d1a181d73 100644 --- a/web/web.go +++ b/web/web.go @@ -37,6 +37,10 @@ func InitWeb() { func staticHandler(handler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Cache-Control", "max-age=31556926, public") + if strings.HasSuffix(r.URL.Path, "/") { + http.NotFound(w, r) + return + } handler.ServeHTTP(w, r) }) } |