Hi, 

I am new on this forum and I am also new working with nginx. I know the
basic of nginx.

I was wondering if someone could help me to write a script to rename a
cookie name in a http response header.

I have the following apache script for that but I am unable to convert it to
nginx.

<Location />
        ProxyPass  http://internal-elb.eu-west-1.elb.amazonaws.com/
        ProxyPassReverse  http://internal-elb.eu-west-1.elb.amazonaws.com/
        <IfModule mod_headers.c>
                #Change from AWSELB cookie to INTELB 
                Header edit Set-Cookie "AWSELB=([0-9a-zA-Z\-]*);"
"INTELB=$1;"
                # When the client request arrives with AWSELB cookie name,
change it to OLD
                RequestHeader edit Cookie "AWSELB=([0-9a-zA-Z\-]*)"
"OLD=$1"
                # Rename the INTELB to AWSELB again so the reverse proxy can
send the request to internal elb
                RequestHeader edit Cookie "INTELB=([0-9a-zA-Z\-]*)"
"AWSELB=$1"
                # Td funciona como experado.
        </IfModule>
</Location>

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,276319,276319#msg-276319

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to