arunoda / meteor-up-legacy

Production Quality Meteor Deployments
MIT License
2.26k stars 395 forks source link

Broken connection.clientAddress if connected with SSL #360

Open artpolikarpov opened 9 years ago

artpolikarpov commented 9 years ago

If I connect over http everything is ok, but when switching to https connection.clientAddress becomes 127.0.0.1. And connection.httpHeaders['x-forwarded-for'] is empty. Sad.

I think this besause of wrong stud.conf. I tried to change write-ip and write-proxy to on, but no luck. Do you have any idea?

May be related to: https://github.com/meteorhacks/cluster/issues/39

arunoda commented 9 years ago

Since stud is a SSL terminator, it does not add x-forwarded-for AFAIK. It's an issue for me as well. That's why I'm planning to move into bud, but still figuring out what the transition from stud looks like.

On Tue, Apr 7, 2015 at 11:12 PM Artem Polikarpov notifications@github.com wrote:

If I connect over http everything is ok, but when switching to https connection.clientAddress becomes 127.0.0.1. And connection.httpHeaders['x-forwarded-for'] is empty. Sad.

I think this besause of wrong stud.conf. I tried to change write-ip and write-proxy to on, but no luck. Do you have any idea?

May be related to: meteorhacks/cluster#39 https://github.com/meteorhacks/cluster/issues/39

— Reply to this email directly or view it on GitHub https://github.com/arunoda/meteor-up/issues/360.

artpolikarpov commented 9 years ago

Great to hear that I’m not alone. How soon you plan to start finding solutions?

arunoda commented 9 years ago

May be next week or this week.

On Wed, Apr 8, 2015 at 2:26 AM Artem Polikarpov notifications@github.com wrote:

Great to hear that I’m not alone. How soon you plan to start finding solutions?

— Reply to this email directly or view it on GitHub https://github.com/arunoda/meteor-up/issues/360#issuecomment-90730406.

artpolikarpov commented 9 years ago

Did you figure something already? @arunoda

artpolikarpov commented 9 years ago

Still hope for your respond :-)

oliversd commented 9 years ago

+1 with this issue. Any timeline? If I install nginx and configure as a proxy will it fix it?

arunoda commented 9 years ago

Use mupx: https://github.com/arunoda/meteor-up/tree/mupx# (we've implemented this into that)

oliversd commented 9 years ago

Thanks I will try it

oliversd commented 9 years ago

It works with mupx and connection.httpHeaders['x-forwarded-for']

Thanks!

artpolikarpov commented 9 years ago

Yup.Thanks!