proxy_redirect not working with "refresh"
aqqa11 at earthlink.net
Fri May 1 06:01:12 UTC 2015
>From: Francis Daly <francis at daoine.org>
>Sent: Apr 30, 2015 4:11 AM
>To: nginx at nginx.org
>Subject: Re: proxy_redirect not working with "refresh"
>That's not a "Refresh" header field.
>That is something in the http response body.
>In general, nginx doesn't mess with the response body.
>(You can configure it to, but I tend to dislike doing that.)
>> Did I miss anything? Actually I don't understand that line about "proxy_set_header Host $host", I just copied from web.
>Why does your back-end include the string "http://192.168.1.9/" in its
>Can you make it instead include a string based on the Host: header it
>receives? If so, that is what the "proxy_set_header Host $host" is for.
Thank you so much. That saved me from the hours of searching.
Indeed, the documentation said it's about "proxied server response". I should expect every word in nginx documention counts :-)
The backend is an oudated legacy application, don't know why they did that, and I tried but can't figure out how to fix. So I just used the sub_filter to rewrite and it worked. Indeed I still have to "proxy_set_header Host $host" on the proxy to make that work as well.
More information about the nginx