diff options
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmd/web.go b/cmd/web.go index 8d9387e06f..80516058fb 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -19,7 +19,6 @@ import ( "code.gitea.io/gitea/routers" "code.gitea.io/gitea/routers/install" - context2 "github.com/gorilla/context" "github.com/urfave/cli" ini "gopkg.in/ini.v1" ) @@ -71,7 +70,7 @@ func runHTTPRedirector() { http.Redirect(w, r, target, http.StatusTemporaryRedirect) }) - var err = runHTTP("tcp", source, "HTTP Redirector", context2.ClearHandler(handler)) + var err = runHTTP("tcp", source, "HTTP Redirector", handler) if err != nil { log.Fatal("Failed to start port redirection: %v", err) @@ -209,10 +208,10 @@ func listen(m http.Handler, handleRedirector bool) error { if handleRedirector { NoHTTPRedirector() } - err = runHTTP("tcp", listenAddr, "Web", context2.ClearHandler(m)) + err = runHTTP("tcp", listenAddr, "Web", m) case setting.HTTPS: if setting.EnableLetsEncrypt { - err = runLetsEncrypt(listenAddr, setting.Domain, setting.LetsEncryptDirectory, setting.LetsEncryptEmail, context2.ClearHandler(m)) + err = runLetsEncrypt(listenAddr, setting.Domain, setting.LetsEncryptDirectory, setting.LetsEncryptEmail, m) break } if handleRedirector { @@ -222,22 +221,22 @@ func listen(m http.Handler, handleRedirector bool) error { NoHTTPRedirector() } } - err = runHTTPS("tcp", listenAddr, "Web", setting.CertFile, setting.KeyFile, context2.ClearHandler(m)) + err = runHTTPS("tcp", listenAddr, "Web", setting.CertFile, setting.KeyFile, m) case setting.FCGI: if handleRedirector { NoHTTPRedirector() } - err = runFCGI("tcp", listenAddr, "FCGI Web", context2.ClearHandler(m)) + err = runFCGI("tcp", listenAddr, "FCGI Web", m) case setting.UnixSocket: if handleRedirector { NoHTTPRedirector() } - err = runHTTP("unix", listenAddr, "Web", context2.ClearHandler(m)) + err = runHTTP("unix", listenAddr, "Web", m) case setting.FCGIUnix: if handleRedirector { NoHTTPRedirector() } - err = runFCGI("unix", listenAddr, "Web", context2.ClearHandler(m)) + err = runFCGI("unix", listenAddr, "Web", m) default: log.Fatal("Invalid protocol: %s", setting.Protocol) } |