Created
June 9, 2014 10:26
-
-
Save mxlje/e540eaab8cbfa93597d9 to your computer and use it in GitHub Desktop.
varnish remove tracking cookies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (req.http.Cookie) { | |
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__utm.=[^;]+;? *", "\1"); # removes all cookies named __utm? (utma, utmb...) - tracking thing | |
if (req.http.Cookie == "") { | |
remove req.http.Cookie; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment