aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-chi/chi/middleware/profiler.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2021-02-28 18:08:33 -0500
committerGitHub <noreply@github.com>2021-02-28 18:08:33 -0500
commit47f6a4ec3f058f69b65fb6501d6ac98994b8f8da (patch)
tree4d1421a4c836de9de4014117419c151035c17eec /vendor/github.com/go-chi/chi/middleware/profiler.go
parent030646eea41e17e58e11e73b19339630b6d6148e (diff)
downloadgitea-47f6a4ec3f058f69b65fb6501d6ac98994b8f8da.tar.gz
gitea-47f6a4ec3f058f69b65fb6501d6ac98994b8f8da.zip
go1.16 (#14783)
Diffstat (limited to 'vendor/github.com/go-chi/chi/middleware/profiler.go')
-rw-r--r--vendor/github.com/go-chi/chi/middleware/profiler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/go-chi/chi/middleware/profiler.go b/vendor/github.com/go-chi/chi/middleware/profiler.go
index 1d44b8259a..f5b62f7c32 100644
--- a/vendor/github.com/go-chi/chi/middleware/profiler.go
+++ b/vendor/github.com/go-chi/chi/middleware/profiler.go
@@ -23,10 +23,10 @@ func Profiler() http.Handler {
r.Use(NoCache)
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, r.RequestURI+"/pprof/", 301)
+ http.Redirect(w, r, r.RequestURI+"/pprof/", http.StatusMovedPermanently)
})
r.HandleFunc("/pprof", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, r.RequestURI+"/", 301)
+ http.Redirect(w, r, r.RequestURI+"/", http.StatusMovedPermanently)
})
r.HandleFunc("/pprof/*", pprof.Index)