proxy: cookie injection or header filter

Andrzej Zadrożny azadrozny at gmail.com
Wed Oct 27 17:03:27 MSD 2010


My nginx proxy configuration:

        location / {
            proxy_pass         http://site.external.com/;
            proxy_redirect http://site.external.com http://site.local.my;
            proxy_set_header    Accept-Encoding "";
            sub_filter http://site.external.com https://site.local.my;
            sub_filter_types text/xml text/css text/javascript;
            sub_filter_once off;
        }
Every thing would be great but site.external.com sets cookie with
domain .external.com and browser doesn't accept it. So i would like to
filter the header of the response, or inject a cookie (add_header
Set-Cookie "JSESSIONID=....) based on existing Set-Cookie http
response.

Can any one suggest a configuration, module, link ... whatever ?

Best regards.

-- 
Andrzej Zadrożny
e-mail: azadrozny at gmail.com



More information about the nginx mailing list