Passing Cookies to Drupal Backend

Reinis Rozitis r at
Wed Jul 27 17:17:34 CEST 2016

> I have been asked if it is possible to somehow retain cookies so that they 
> are available to the Drupal PHP code, but  not  have them used for caching 
> within Varnish.
> I could not think of a way to perform this, but thought I would ask those 
> with more experience.
> Does anyone know if this is possible?

In general yes it should be possible.

You can look for example at this article (it's for the 3.x varnish but 
you should get the idea).

For recent 4.x varnish the filtering should be even more simple with the 
Cookie vmod 
and maybe the variable mod to store the initial cookies (rather than the old 
way in extra headers).


More information about the varnish-misc mailing list