Welcome! Log In Create A New Profile

Advanced

How to rewrite content of http responses

Posted by mikiso 
How to rewrite content of http responses
May 04, 2010 09:09PM
Hi folks,
I'm using nginx as a reverse proxy inside Zimbra Communication Suite for webmail system in Japan.
We hosted many domains and want a URL scheme in a http response
body to be replaced by other scheme according to the name of domain,
that is, in the case of response from some domains we should replace
"http" by "https" and one from other domains we set "http" as it is.

How can we implement that by the settings of nginx?
Is it "sub_filter" directive?

Any comment would be appreciated.

Thanks,
Soichiro
Re: How to rewrite content of http responses
May 05, 2010 11:20AM
FYI, we've set proxy_redirect directive to rewrite URLs in the location header of the response.
I think creating a response filter is one solution, but I'd like to know whether some settings
for nginx can solve it.
Our nginx version is 0.5.30.

Regards,
Soichiro
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 140
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready