How to add cookie when proxy_pass via programming?

speedfirst nginx-forum at
Fri May 27 08:49:30 MSD 2011

Hey, I want to add custom cookie when proxy pass to the upstream in my
custom module. I want to implement like what this config does:

proxy_pass http://servers;
proxy_add_header Cookie "$http_cookie;KEY=VALUE";

But sinc the VALUE is dynamically generated so I need to add this cookie
via programming.

How to do that?

Thanks very much.

Posted at Nginx Forum:,201413,201413#msg-201413

More information about the nginx mailing list