proxy_redirect not working with "refresh"

John aqqa11 at
Thu Apr 30 06:43:14 UTC 2015 says:

"(proxy_redirect) Sets the text that should be changed in the “Location” and “Refresh” header fields of a proxied server response."

All examples I found online only mentioned how it works with "Location", and that also works perfectly with me.

But it just doesn't work with "Refresh" for me.  My backend site is:

<meta http-equiv="refresh" content="0;url=" />

The nginx on my proxy reads:

location / {
   proxy_set_header Host $host;
   proxy_redirect default;
   proxy_redirect  /;
   proxy_redirect http://$proxy_host/ /;
   proxy_redirect ~.* /;
   proxy_redirect / /;

You can see I have exhausted all options on that nginx documentation.  But after restarting nginx, "curl" still sees that "Refresh" line not translated to, and visiting on browser will still redirect me to, which is unreachable.

Did I miss anything?  Actually I don't understand that line about "proxy_set_header Host $host", I just copied from web.

Thank you!

More information about the nginx mailing list