claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 184 forks source link

Passport does not work under Nginx Reverse-proxy #72

Closed sebglon closed 9 years ago

sebglon commented 9 years ago

The Google Oauth does not work under a reverse-proxy. I think you are missing the next module passport-reverserproxy.

Is it possible to add this?

Thanks

claudioc commented 9 years ago

Hi,

oh, I didn't test it to be honest. I will and try to fix it. Thanks for reporting the issue!

claudioc commented 9 years ago

Can you tell me which kind of reverse proxy are you using? It would be fantastic if could also provide the configuration :)

claudioc commented 9 years ago

I just tried using nginx and proxing requests to jingo, and it works. My configuration follows:

daemon off;
error_log /dev/stdout info;

events {
    worker_connections  1024;
}

http {
    server {
        listen 2222;

        server_name jingo.dev;

        location / {
            proxy_pass http://127.0.0.1:6067;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }
}
sebglon commented 9 years ago

Yes but My proxy is on another server. and All the server jingo is not directy accessible on web.

sebglon commented 9 years ago

This issue can be closed; my server had no internet access. After changing this, all is OK