Welcome! Log In Create A New Profile

Advanced

Remove specific cookies from HTTP headers.

Posted by alexscott 
Remove specific cookies from HTTP headers.
November 21, 2012 04:48AM
Hello!
I need your help to remove certain cookies from the HTTP headers.
I have three cookies in the HTTP headers, but I would like to remove 2 of them; cookie1 and cookie2, meanwhile cookie3 should be passed on to the client.

map $http_cookie $pass_cookie {
default 0;
~cookie3 1;
}

..

server {

if ($http_cookie !~ (cookie1|cookie2)) {
fastcgi_hide_header $http_cookie {
}
} # Syntax error..


fastcgi_cache_bypass $pass_cookie;
fastcgi_no_cache $pass_cookie;
fastcgi_pass_header $pass_cookie;

Can you help me?

Best regards,
Alex.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
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