Optional proxyproto header

This commit is contained in:
zakuwaki authored and 世界 committed 2022-09-09 14:44:18 +08:00
1 parent 87bc292296
commit 46a8f24400
3 files changed
+18 -13

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ func (a *myInboundAdapter) ListenTCP() (net.Listener, error) {
}
if a.listenOptions.ProxyProtocol {
a.logger.Debug("proxy protocol enabled")
tcpListener = &proxyproto.Listener{Listener: tcpListener}
tcpListener = &proxyproto.Listener{Listener: tcpListener, AcceptNoHeader: a.listenOptions.ProxyProtocolAcceptNoHeader}
}
a.tcpListener = tcpListener
return tcpListener, err