mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
httpd/webdav: allow to configure trusted proxy header and depth
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1551,11 +1551,12 @@ func TestProxyHeaders(t *testing.T) {
|
||||
testIP := "10.29.1.9"
|
||||
validForwardedFor := "172.19.2.6"
|
||||
b := Binding{
|
||||
Address: "",
|
||||
Port: 8080,
|
||||
EnableWebAdmin: true,
|
||||
EnableWebClient: false,
|
||||
ProxyAllowed: []string{testIP, "10.8.0.0/30"},
|
||||
Address: "",
|
||||
Port: 8080,
|
||||
EnableWebAdmin: true,
|
||||
EnableWebClient: false,
|
||||
ProxyAllowed: []string{testIP, "10.8.0.0/30"},
|
||||
ClientIPProxyHeader: "x-forwarded-for",
|
||||
}
|
||||
err = b.parseAllowedProxy()
|
||||
assert.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user