Location header rewrite

How do I go about rewriting the Location header in a response?
I have setup nginx as a reverse proxy to a web mail server. Everything
run good if data is self contain on that server. When an email have
links to different servers in its environment, it sends the Locations
header with the uri to it. How do I go about search and replace these
value.

I have tried the proxy_redirect but it doesn’t work.
I have looked at both the header and headers_more module but it doesn’t
provide a search and replace function.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,219582,219582#msg-219582

The proxy_redirect should help.
May you show your nginx config and expected/ HTTP Location headers in
response?

The proxy_redirect should help.
May you show your nginx config and expected/ HTTP Location headers in response?

*expected/observed HTTP Location headers in response

After a bunch of hours not looking at it, I found my problem. With too
many commented out line and apparently I have a proxy_redirect off; line
so it never rewrite it even though I have the proxy_redirect lines.

Thanks.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,219582,219604#msg-219604

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs