From 36a2a1943db63d6cb65d7ceb2fdd096c34f1683d Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Thu, 17 Jul 2025 15:58:07 +0100 Subject: Remove trailing slash from url rewrite --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 8292649..c4605c9 100644 --- a/main.go +++ b/main.go @@ -53,7 +53,7 @@ func main() { if cfg.Command.Host == "" { slog.Warn("command interface host is empty - neither api or web interface will be accessible") } else { - mux.Handle(fmt.Sprintf("%s/api/", cfg.Command.Host), http.StripPrefix("/api/", api.NewMux(&cfg, siteIndex))) + mux.Handle(fmt.Sprintf("%s/api/", cfg.Command.Host), http.StripPrefix("/api", api.NewMux(&cfg, siteIndex))) mux.Handle(fmt.Sprintf("%s/", cfg.Command.Host), web.NewMux(&cfg, siteIndex, authenticator)) } mux.HandleFunc("/", server.ServeSite(siteIndex)) -- cgit v1.2.3-70-g09d2