Open BenAHammond opened 9 years ago
See #23 and http://docs.meteor.com/#/full/meteor_onconnection. You need to set the HTTP_FORWARDED_COUNT
environment variable.
This is also mentioned in the README.
I've got that value set and I'm not seeing the correct IP in the status.lastLogin.upAddr field.
On Wed, Dec 24, 2014 at 9:45 PM, Andrew Mao notifications@github.com wrote:
See #23 https://github.com/mizzao/meteor-user-status/issues/23 and http://docs.meteor.com/#/full/meteor_onconnection.
— Reply to this email directly or view it on GitHub https://github.com/mizzao/meteor-user-status/issues/48#issuecomment-68088470 .
What do you have that value set to, and how many reverse proxies do you have?
Can you provide an example of the client's full headers from a Meteor.onConnection
callback?
This package relies on Meteor's IP address detection, so it's not something that's likely to be an issue with the package.
Okay then, no worries on fixing it. The value is set to 1 at the moment, as I'm only behind a single proxy.
On Fri, Dec 26, 2014 at 1:38 PM, Andrew Mao notifications@github.com wrote:
What do you have that value set to, and how many reverse proxies do you have?
Can you provide an example of the client's full headers from a Meteor.onConnection callback?
This package relies on Meteor's IP address detection, so it's not something that's likely to be an issue with the package.
— Reply to this email directly or view it on GitHub https://github.com/mizzao/meteor-user-status/issues/48#issuecomment-68159253 .
Try printing out process.env.HTTP_FORWARDED_COUNT
when starting your app to see if you've actually set it properly.
With my Meteor instance behind a reverse proxy (Nginx) the ipAddr is always 127.0.0.1. Any chance you could detect a forwarded port and use that/add it as a new field?