From b0c0162b0634b54b4246b998df9f6e0ef2fcdffc Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Fri, 10 Oct 2025 09:19:29 +0200 Subject: [PATCH] feat: serve only the bootstrap minimal css file Fixes #45. Signed-off-by: Julien Riou --- src/server/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/server.go b/src/server/server.go index df86710..8443f22 100644 --- a/src/server/server.go +++ b/src/server/server.go @@ -177,7 +177,9 @@ func (s *Server) Start() error { } if s.config.BootstrapDirectory != "" { - r.PathPrefix("/static/bootstrap/").Handler(http.StripPrefix("/static/bootstrap/", http.FileServer(http.Dir(s.config.BootstrapDirectory)))) + r.HandleFunc("/static/bootstrap/css/bootstrap.min.css", func(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, s.config.BootstrapDirectory+"/css/bootstrap.min.css") + }) } r.Path("/").Handler(&HomeHandler{Templates: templates, PageData: p}).Methods("GET")