httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject [users@httpd] Conditionally strip/remove a specific cookie from request
Date Sun, 09 Dec 2012 20:19:49 GMT

We are trying to have an Apache (acting as a proxy) conditionally strip/remove a cookie from
the incoming request, before it proxies the request.

The condition is that, on the incoming request:

- there is a specific HTTP header, MYHEADER, with a value of "MYHEADERVALUE", and
- the root of the request URL's hostname (e.g., if hostname in the request URL is "",
then root is "") matches a certain string, e.g., ""

If the conditions above are true, then we want to remove a cookie named "MYCOOKIE" from the
incoming request, before forwarding the request onto the proxied host.

I think that if the conditions match, according to this: 

something like:

RequestHeader add Cookie "MYCOOKIE='';expires='SOME_PAST_DATE'; Path=COOKIE_PATH" 

would remove the cookie, but I'm not sure how to construct the expression/expr that says something
like this:

<If && MYHEADER=<some_string>>
        RequestHeader add Cookie "MYCOOKIE=';expires='SOME_PAST_DATE'; Path=COOKIE_PATH"

Also, I'm not sure what that "SOME_PAST_DATE" should be.

Can anyone here tell me?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message