I know that this question has been asked multiple times but after a trying a lot of solutions I am still stuck.
I am using NginX to proxy pass to a NodeJs applicatio
You might add these lines:
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Example, I proxy public port 80 to local port 880
location / {
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 32 8k;
proxy_busy_buffers_size 64k;
proxy_pass http://127.0.0.1:880/;
}
Note: Make sure to restart nginx. You might need to use another browser to test the new configuration (avoid cache)