From afb416ea57e6fce9cd8d5e6564adcb8071418e97 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Wed, 10 Mar 2021 22:52:41 +0100 Subject: [PATCH] go files serve RequestURI -> URL.Path. --- server/internal/http/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/internal/http/http.go b/server/internal/http/http.go index d1294d34..32c1c10f 100644 --- a/server/internal/http/http.go +++ b/server/internal/http/http.go @@ -36,7 +36,7 @@ func New(conf *config.Server, webSocketHandler types.WebSocketHandler) *Server { fs := http.FileServer(http.Dir(conf.Static)) router.Get("/*", func(w http.ResponseWriter, r *http.Request) { - if _, err := os.Stat(conf.Static + r.RequestURI); !os.IsNotExist(err) { + if _, err := os.Stat(conf.Static + r.URL.Path); !os.IsNotExist(err) { fs.ServeHTTP(w, r) } else { w.WriteHeader(http.StatusNotFound)