Welcome! Log In Create A New Profile

Advanced

cookie rename nginx

September 11, 2017 06:56AM
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>
Subject Author Posted

cookie rename nginx

rgentil September 11, 2017 06:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready