1

How can I test if a cookie starts with SESS* in the Varnish config file. I want all requests to hit the server if this cookie is set. Is it a regular regex?

Eduard Luca
  • 371
  • 2
  • 9
  • 19

1 Answers1

2

Yeah, just use a regex in vcl_recv. Something like:

if (req.http.Cookie ~ "(^|;\s*)SESS") {
    return(pass);
}
Pax
  • 335
  • 2
  • 8