Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

0.1.0 introduced localhost issue #28

Closed
AdamGerthel opened this issue Aug 21, 2016 · 4 comments
Closed

0.1.0 introduced localhost issue #28

AdamGerthel opened this issue Aug 21, 2016 · 4 comments
Assignees

Comments

@AdamGerthel
Copy link

I just upgraded to 0.1.0 from 0.0.24 and noticed that the localhost address has changed, which in my case made my application block localhost. I solved it in OSX by using ::ffff:127.0.0.1 but on Windows under IISNode the localhost IP seems to be and empty string (Access denied to IP address:). Allowing an empty string in the array of allowed IPs seems to allow any IP.

Is there an issue with fetching the localhost IP properly?

@ryanbillingsley
Copy link
Owner

I'm not sure but I will check it out tomorrow and see what I can figure out

Sent from my iPhone

On Aug 21, 2016, at 7:26 AM, Adam Gerthel <notifications@github.commailto:notifications@github.com> wrote:

I just upgraded to 0.1.0 from 0.0.24 and noticed that the localhost address has changed, which in my case made my application block localhost. I solved it in OSX by using ::ffff:127.0.0.1 but on Windows under IISNode the localhost IP seems to be and empty string (Access denied to IP address:). Allowing an empty string in the array of allowed IPs seems to allow any IP.

Is there an issue with fetching the localhost IP properly?

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/28, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAI8G25AFgDAE9gifZJMB8N3USaEOU6oks5qiDXegaJpZM4JpRw6.

@ryanbillingsley
Copy link
Owner

@AdamGerthel the filter gets the requesting IP address from express which is part of the req object, specifically req.connection.remoteAddress. You might look to see if that exists when you are getting the request through IISNode by putting a middleware function before the filter and checking that property.

You might also check this issue out, as it seems that IISNode might not populate that property and you would have to use the allowFoward setting on ipFilter to check the x-forwarded-for header for the ip.

@AdamGerthel
Copy link
Author

Thanks, I'll give it a try!

@ryanbillingsley
Copy link
Owner

I am going to go ahead and close this but feel free to open it if there is still a problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants