문제

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

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top