Fix: TCP & WS override AcceptProxyProtocol (#425)

pull/452/head
Jim Han 4 years ago committed by GitHub
parent 6c936e2fd3
commit e564d9ef7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,7 +38,8 @@ func ListenTCP(ctx context.Context, address net.Address, port net.Port, streamSe
if streamSettings.SocketSettings == nil {
streamSettings.SocketSettings = &internet.SocketConfig{}
}
streamSettings.SocketSettings.AcceptProxyProtocol = l.config.AcceptProxyProtocol
streamSettings.SocketSettings.AcceptProxyProtocol =
l.config.AcceptProxyProtocol || streamSettings.SocketSettings.AcceptProxyProtocol
}
var listener net.Listener
var err error

@ -89,7 +89,8 @@ func ListenWS(ctx context.Context, address net.Address, port net.Port, streamSet
if streamSettings.SocketSettings == nil {
streamSettings.SocketSettings = &internet.SocketConfig{}
}
streamSettings.SocketSettings.AcceptProxyProtocol = l.config.AcceptProxyProtocol
streamSettings.SocketSettings.AcceptProxyProtocol =
l.config.AcceptProxyProtocol || streamSettings.SocketSettings.AcceptProxyProtocol
}
var listener net.Listener
var err error

Loading…
Cancel
Save