vcl broken after upgrade from 4.1 to 5.0

Dridi Boukelmoune dridi at varni.sh
Wed Aug 8 12:14:48 UTC 2018


> Yes but i'm sorry i'm unable to provide code. Is there any way to use
> something like a loop or recursion? In that case i would be able to
> modify a single set-cookie header like we need it.

A "foreach" construct would indeed help for the case of multiple
headers and it has been discussed in the past but to no avail. It's
not trivial to add this to VCL and ensure soundness.

> I also wasn't able to solve it by mod_headers.

I'm not really surprised. This would require a VMOD of its own.

Did you look at alternatives such as vmod-cookie and vmod-cookieplus?

https://github.com/varnish/varnish-modules/blob/master/docs/vmod_cookie.rst#vmod_cookie
https://docs.varnish-software.com/varnish-cache-plus/vmods/cookieplus/#description

Maybe one of those provides enough capabilities for what you need to do.

Dridi


More information about the varnish-misc mailing list