On 2008-10-07 15:49, Espen Braastad <[EMAIL PROTECTED]> wrote: >Hi, > >The question: >Is it possible to match cookie names in each request to a regexp, and >remove only specified cookies? Other cookies must not be removed.
The answer: Yes. The following two lines in vcl_recv will remove the cookie named baz only: sub vcl_recv { # Is it the first one? set req.http.cookie = regsub(req.http.cookie, "baz=[^;]+(; )?", ""); # Or perhaps one in the middle or the last one? set req.http.cookie = regsub(req.http.cookie, "(; )?baz=[^;]+", ""); } (Thank you, Tollef) mvh Espen Braastad, +47 938 60 737 [EMAIL PROTECTED] Linpro AS - Ledende på Linux _______________________________________________ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc