Trimming whitespace in XFF for IP whitelisting
This commit is contained in:
parent
4cb1ae4626
commit
44e06a1a1e
2 changed files with 4 additions and 3 deletions
|
@ -32,7 +32,7 @@ func TestIsAuthorized(t *testing.T) {
|
|||
whiteList: []string{"1.2.3.4/24"},
|
||||
allowXForwardedFor: true,
|
||||
remoteAddr: "10.2.3.1:123",
|
||||
xForwardedForValues: []string{"1.2.3.1, 10.2.3.1"},
|
||||
xForwardedForValues: []string{"10.2.3.1, 1.2.3.1"},
|
||||
authorized: true,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue