aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/web_graceful.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web_graceful.go')
-rw-r--r--cmd/web_graceful.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/web_graceful.go b/cmd/web_graceful.go
index 1618208c55..ba88cc59c2 100644
--- a/cmd/web_graceful.go
+++ b/cmd/web_graceful.go
@@ -15,8 +15,8 @@ import (
"code.gitea.io/gitea/modules/setting"
)
-func runHTTP(network, listenAddr, name string, m http.Handler) error {
- return graceful.HTTPListenAndServe(network, listenAddr, name, m)
+func runHTTP(network, listenAddr, name string, m http.Handler, useProxyProtocol bool) error {
+ return graceful.HTTPListenAndServe(network, listenAddr, name, m, useProxyProtocol)
}
// NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector
@@ -36,7 +36,7 @@ func NoInstallListener() {
graceful.GetManager().InformCleanup()
}
-func runFCGI(network, listenAddr, name string, m http.Handler) error {
+func runFCGI(network, listenAddr, name string, m http.Handler, useProxyProtocol bool) error {
// This needs to handle stdin as fcgi point
fcgiServer := graceful.NewServer(network, listenAddr, name)
@@ -47,7 +47,7 @@ func runFCGI(network, listenAddr, name string, m http.Handler) error {
}
m.ServeHTTP(resp, req)
}))
- })
+ }, useProxyProtocol)
if err != nil {
log.Fatal("Failed to start FCGI main server: %v", err)
}