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

Était-ce utile?

La 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.

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top