summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/static.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/static.go b/web/static.go
index 64d326e24..800bd2b72 100644
--- a/web/static.go
+++ b/web/static.go
@@ -45,7 +45,8 @@ func (w *Web) InitStatic() {
// trailing slash. We don't want to use StrictSlash on the w.MainRouter and affect
// all routes, just /subpath -> /subpath/.
w.MainRouter.HandleFunc("", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, r.URL.String()+"/", http.StatusFound)
+ r.URL.Path += "/"
+ http.Redirect(w, r, r.URL.String(), http.StatusFound)
}))
}
}