httpd: allow to use proxy protocol

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-08-10 21:02:38 +02:00
parent 954c36c0a2
commit 68e62d3d9b
13 changed files with 118 additions and 38 deletions

View File

@@ -128,9 +128,11 @@ func (s *httpdServer) listenAndServe() error {
httpServer.TLSConfig.ClientAuth = tls.RequireAndVerifyClientCert
httpServer.TLSConfig.VerifyConnection = s.verifyTLSConnection
}
return util.HTTPListenAndServe(httpServer, s.binding.Address, s.binding.Port, true, logSender)
return util.HTTPListenAndServe(httpServer, s.binding.Address, s.binding.Port, true,
s.binding.listenerWrapper(), logSender)
}
return util.HTTPListenAndServe(httpServer, s.binding.Address, s.binding.Port, false, logSender)
return util.HTTPListenAndServe(httpServer, s.binding.Address, s.binding.Port, false,
s.binding.listenerWrapper(), logSender)
}
func (s *httpdServer) verifyTLSConnection(state tls.ConnectionState) error {