Skip to content

Instantly share code, notes, and snippets.

@mxlje
Created June 9, 2014 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxlje/e540eaab8cbfa93597d9 to your computer and use it in GitHub Desktop.
Save mxlje/e540eaab8cbfa93597d9 to your computer and use it in GitHub Desktop.
varnish remove tracking cookies
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