diff options
Diffstat (limited to 'proxy.go')
-rw-r--r-- | proxy.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -31,6 +31,11 @@ func addEndpoint(s *auth.Sessions, pages page.Pages, e config.Endpoint) { Origin: origin, } + http.HandleFunc(e.Path, func(w http.ResponseWriter, r *http.Request) { + w.Header().Add("Location", e.Path + "/") + w.WriteHeader(http.StatusPermanentRedirect) + }) + http.HandleFunc(e.Path + "/", func(w http.ResponseWriter, r *http.Request) { log.Infof("REQ: %v", r.URL.Path) proxy(w, r, s, pages, end) |