Fix getClientIp: fall back to socket address for whitespace-only X-Fo… #600
Annotations
3 errors
|
verify
Process completed with exit code 1.
|
|
test/security.test.js > getClientIp > handles a leading empty entry (leading comma) by returning the empty string rather than throwing:
test/security.test.js#L179
AssertionError: expected '10.0.0.1' to be '' // Object.is equality
- Expected
+ Received
+ 10.0.0.1
❯ test/security.test.js:179:30
|
|
test/security.test.js > getClientIp > returns an empty string for a whitespace-only X-Forwarded-For header, WITHOUT falling back to the socket address:
test/security.test.js#L169
AssertionError: expected '192.168.1.50' to be '' // Object.is equality
- Expected
+ Received
+ 192.168.1.50
❯ test/security.test.js:169:30
|