summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2021-07-27 09:37:34 +0000
committerNick Thomas <nick@gitlab.com>2021-07-27 09:37:34 +0000
commitf9e7ffda68192d24ff26f0d5ff7fe70e376c32f2 (patch)
tree987108c203fe5583a82bdc44e6277ab6d11fe7af /internal
parent82a2153dcc093a99445aedd3734fe7ef868e3a4b (diff)
parent76260c3b48b08879e631a3e410b5db4e473653e0 (diff)
downloadgitlab-shell-f9e7ffda68192d24ff26f0d5ff7fe70e376c32f2.tar.gz
Merge branch 'sh-update-go-proxyproto' into 'main'
Update go-proxyproto to v0.6.0 See merge request gitlab-org/gitlab-shell!499
Diffstat (limited to 'internal')
-rw-r--r--internal/sshd/sshd.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/sshd/sshd.go b/internal/sshd/sshd.go
index 7f96bef..8b49712 100644
--- a/internal/sshd/sshd.go
+++ b/internal/sshd/sshd.go
@@ -29,6 +29,7 @@ const (
StatusReady
StatusOnShutdown
StatusClosed
+ ProxyHeaderTimeout = 90 * time.Second
)
type Server struct {
@@ -84,7 +85,10 @@ func (s *Server) listen() error {
}
if s.Config.Server.ProxyProtocol {
- sshListener = &proxyproto.Listener{Listener: sshListener}
+ sshListener = &proxyproto.Listener{
+ Listener: sshListener,
+ ReadHeaderTimeout: ProxyHeaderTimeout,
+ }
log.Info("Proxy protocol is enabled")
}