Setting headers and cookies when proxying

Guy Naor guy at
Sat Aug 16 05:22:45 MSD 2008


I am trying to write a module that will insert a header into the request
that is sent to the upstream servers (mongrels). I can set headers based on
the code found in some other modules, but all set the header on the response
headers, not the headers proxied forward. I also would like to set a cookie
in the same form - add a cookie to the headers that will be passed to the
upstream servers.

Any ponters as to where to look for something like that? Or some other
information that could help?

This is to be used in a multi-server load-balancing situation that require
client stickiness. My plan is to release this code so others could use it
once it's stable.



Guy Naor
Morph Labs, Inc.
guy at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list