From 943753f560fab8bb01946618b16c694bc2032827 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 21 Aug 2022 19:20:43 +0100 Subject: Support Proxy protocol (#12527) This PR adds functionality to allow Gitea to sit behind an HAProxy and HAProxy protocolled connections directly. Fix #7508 Signed-off-by: Andrew Thornton --- modules/ssh/ssh_graceful.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/ssh') diff --git a/modules/ssh/ssh_graceful.go b/modules/ssh/ssh_graceful.go index 9b91baf09e..166ea0b982 100644 --- a/modules/ssh/ssh_graceful.go +++ b/modules/ssh/ssh_graceful.go @@ -17,7 +17,7 @@ func listen(server *ssh.Server) { gracefulServer.PerWriteTimeout = setting.SSH.PerWriteTimeout gracefulServer.PerWritePerKbTimeout = setting.SSH.PerWritePerKbTimeout - err := gracefulServer.ListenAndServe(server.Serve) + err := gracefulServer.ListenAndServe(server.Serve, setting.SSH.UseProxyProtocol) if err != nil { select { case <-graceful.GetManager().IsShutdown(): -- cgit v1.2.3