diff options
| author | Leonardo Bishop <me@leonardobishop.net> | 2025-07-17 15:58:07 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.net> | 2025-07-17 15:58:07 +0100 |
| commit | 36a2a1943db63d6cb65d7ceb2fdd096c34f1683d (patch) | |
| tree | b099f5cb47e97dd5c5b9c1d7b3d16aecbd153d79 | |
| parent | b4a9e6d6c3c342b1f8e6d8a61190c53c0e9d4280 (diff) | |
Remove trailing slash from url rewrite
| -rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) |
