diff --git a/internal/http/manager.go b/internal/http/manager.go index 6084eb52..d66879e3 100644 --- a/internal/http/manager.go +++ b/internal/http/manager.go @@ -52,10 +52,10 @@ func New(WebSocketManager types.WebSocketManager, ApiManager types.ApiManager, c if conf.Static != "" { 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) { - http.StripPrefix(r.RequestURI, fs).ServeHTTP(w, r) - } else { + if _, err := os.Stat(conf.Static + r.URL.Path); !os.IsNotExist(err) { fs.ServeHTTP(w, r) + } else { + utils.HttpNotFound(w) } }) }