You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If are you willing to accept a PR to solve this issue, I can offer to write it: for example considering undefined the loopback address or adding an special option for that case.
Thanks!
The text was updated successfully, but these errors were encountered:
Yea, that's what I'm thinking: to maybe just consider the UNIX socket to be the loopback address. It's probably better solved in the forwarded module, maybe. Since a TCP/IP socket in Node.js cal also return undefined for req.connection.remoteAddress, simply assuming that undefined means socket is not really enough to know that for sure.
Hi!
When using an unix socket instead of a tcp port
req.connection.remoteAddress
is undefined. Andforwarded
adds that undefined value to the array of forwarded IPs (https://github.com/jshttp/proxy-addr/blob/master/index.js#L57). So given that undefined is not a valid ip https://github.com/jshttp/proxy-addr/blob/master/index.js#L254 returnsfalse
for the index 0 and so no IP is trusted.If are you willing to accept a PR to solve this issue, I can offer to write it: for example considering undefined the loopback address or adding an special option for that case.
Thanks!
The text was updated successfully, but these errors were encountered: