Rewriting the domain part of Set-Cookie in a proxy_pass

Maxim Dounin mdounin at
Wed Jun 8 18:19:30 MSD 2011


On Wed, Jun 08, 2011 at 10:06:59AM -0400, tobia wrote:

> I wrote:
> > That leaves me with the Perl module...
> ...which apparently cannot do it either: you can only set response
> headers from scratch.
> > $r->header_out(header, value) - set a response header.
> Does anybody have any idea?

You may get upstream response header via $upstream_http_* 
variable, and set one (rewritten with perl_set) with add_header 

The problem is still here though: you can't iterate over multiple 
Set-Cookie headers if there are more than one present in upstream 

Maxim Dounin

More information about the nginx mailing list