This caused me a big headache. I had a file at public/folder/index.html, and when I visited /folder from the main page of our site, I was redirected to the page, but with the Nginx listening port added on. Since nginx is running behind a Heroku reverse proxy, this is obviously undesirable and the page did not load.
This config change prevents the port Nginx is listening on from appearing in the URL during a redirect.
This caused me a big headache. I had a file at public/folder/index.html, and when I visited /folder from the main page of our site, I was redirected to the page, but with the Nginx listening port added on. Since nginx is running behind a Heroku reverse proxy, this is obviously undesirable and the page did not load.
This config change prevents the port Nginx is listening on from appearing in the URL during a redirect.