diff --git a/api/router.go b/api/router.go index 004d5e1..c8469e4 100644 --- a/api/router.go +++ b/api/router.go @@ -49,8 +49,15 @@ func (r *Router) RouteHandler() chi.Router { r.r.Handle("/static/*", http.StripPrefix("/static/", fs)) } else { slog.Info("Static file serving is disabled") + r.r.Get("/", func(w http.ResponseWriter, req *http.Request) { + http.Error(w, "Static serving is disabled", http.StatusForbidden) + }) + r.r.HandleFunc("/static/*", func(w http.ResponseWriter, req *http.Request) { + http.Error(w, "Static serving is disabled", http.StatusForbidden) + }) } + r.r.Route("/api", func(api chi.Router) { api.Route("/block", block.Route(r.cfg)) api.Route("/auth", auth.Route(r.cfg))