Set UseEncodedPath

This commit is contained in:
Darren Shepherd 2020-02-27 21:30:55 -07:00
parent 6b6ff53373
commit 9da27b7130

View File

@ -33,6 +33,7 @@ func Route(next http.Handler, uiSetting func() string) http.Handler {
responsewriter.CacheMiddleware("json", "js", "css")).Handler(content(uiSetting))
root := mux.NewRouter()
root.UseEncodedPath()
root.Path("/dashboard").HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
rw.Header().Add("Location", "/dashboard/")
rw.WriteHeader(http.StatusFound)