mirror of
https://github.com/niusmallnan/steve.git
synced 2025-06-23 05:07:04 +00:00
Set UseEncodedPath
This commit is contained in:
parent
6b6ff53373
commit
9da27b7130
@ -33,6 +33,7 @@ func Route(next http.Handler, uiSetting func() string) http.Handler {
|
|||||||
responsewriter.CacheMiddleware("json", "js", "css")).Handler(content(uiSetting))
|
responsewriter.CacheMiddleware("json", "js", "css")).Handler(content(uiSetting))
|
||||||
|
|
||||||
root := mux.NewRouter()
|
root := mux.NewRouter()
|
||||||
|
root.UseEncodedPath()
|
||||||
root.Path("/dashboard").HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
|
root.Path("/dashboard").HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
|
||||||
rw.Header().Add("Location", "/dashboard/")
|
rw.Header().Add("Location", "/dashboard/")
|
||||||
rw.WriteHeader(http.StatusFound)
|
rw.WriteHeader(http.StatusFound)
|
||||||
|
Loading…
Reference in New Issue
Block a user