Question

Is it possible to remove headers in vcl_deliver whose name matches a certain regular expression?

We throw headers called "X-env-blah" where "blah" could contain any value, and want them to be removed from the front-end.

Example (doesn't work):

unset resp.http.x-env$;

Or is there a way to loop through all the headers in vcl_deliver?

Thanks

Was it helpful?

Solution

VCL is a simple language that is converted into machine code when loaded.

There are no loops nor any globbing.

To do this you will either have to write a VMOD/inline-C, or just unset all possible headers each time.

OTHER TIPS

Yes, but you need to install the vmod header. See: livmod-herader page at github.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top