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

@@ -2199,6 +2199,15 @@ func TestAllowedProxyUnixDomainSocket(t *testing.T) {
}
}
func TestProxyListenerWrapper(t *testing.T) {
b := Binding{
ProxyMode: 0,
}
require.Nil(t, b.listenerWrapper())
b.ProxyMode = 1
require.NotNil(t, b.listenerWrapper())
}
func TestProxyHeaders(t *testing.T) {
username := "adminTest"
password := "testPwd"