diff --git a/internal/server/server.go b/internal/server/server.go index d47d1e7..ed90f4e 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -410,8 +410,7 @@ func (s *Server) handleFavicon(w http.ResponseWriter, r *http.Request) { func (s *Server) staticFileHandler() http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // Remove /static/ prefix from URL path to get the actual file path - filePath := "static" + r.URL.Path[len("/static"):] + filePath := "static" + r.URL.Path data, err := s.staticFiles.ReadFile(filePath) if err != nil { diff --git a/static/index.html b/static/index.html index 5dd05b6..d8b3b0f 100644 --- a/static/index.html +++ b/static/index.html @@ -3,35 +3,16 @@
-