aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.net>2025-07-17 15:58:07 +0100
committerLeonardo Bishop <me@leonardobishop.net>2025-07-17 15:58:07 +0100
commit36a2a1943db63d6cb65d7ceb2fdd096c34f1683d (patch)
treeb099f5cb47e97dd5c5b9c1d7b3d16aecbd153d79 /main.go
parentb4a9e6d6c3c342b1f8e6d8a61190c53c0e9d4280 (diff)
Remove trailing slash from url rewrite
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
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))