Situation::
- Varnish needs to cache even in the presence of cookies on the request.
- The request may contain N arbitrary cookies of which certain known cookies must not form part of the cache key. The arbitrary cookies don't contain any user sensitive data, eg. they are cosmetic helpers like is_authenticated=1.
- The actual backend must receive the original set of cookies unmolested in the case of a cache miss.
- I don't want to check for URL patterns in the VCL because that assumes too much knowledge of the backend.
This is surprisingly hard to solve. All solutions I've found so far assumes a whitelist for (2) whereas I need a blacklist. And most solutions delete cookies which are supposed to go through to the backend.