set-Cookie with ProxyPassReverseCookieDomain feature

dt dt20xx at gmail.com
Tue Dec 15 04:10:40 MSK 2009


Hi,

I'm thinking of using nginx as reverse proxy server to an original
server which use cookie for user-authentication.

Since the original server provide set-cookie header with specific
domain,  domain-setting parameter in set-cookie header has to be
replaced.

Would you please teach me how to configure this feature?
I think Apahe mod-proxy's  "ProxyPassReverseCookieDomain" feature is
similar , But I coudn't find those kind of module or property for
nginx.

== nginx.conf ==

upstream xxx {
  server www.xxx.com:80 weight=3;
}
server {
 listen 80;
 server_name yyy;
 proxy_set_header X-Real-Ip $remote_addr;
 proxy_set_header X-Forwardded-For $proxy_add_x_forwarded_for;
$proxy_set_header Host $http_host;

 location / {
   proxy_pass_header Set-Cookie;
   proxy_pass http://xxx;
   sub_filter_once off;
   sub_filter 'www.xxx.com' 'yyy';
  }
}

======

Daisuke Takano dt20xx at gmail.com



More information about the nginx mailing list