Is it possible to add a header with dynamic name in Varnish? - Stack Overflow

As far as I know (but i'm quite new in this topic) there is a standard way of setting headers in V

As far as I know (but i'm quite new in this topic) there is a standard way of setting headers in Varnish that looks like below

set resp.http.X-Custom-Header = "some-value";

But what I really need is a header with dynamic name (or at least part of the name should be dynamic). This dynamic name is based on request or response data. For example I'd like to set/add a header with name "X-Custom-Header-<dynamic_part>" where <dynamic_part> is simply value from variable. The upshot should be like

X-Custom-Header-test1: someValue;

In other words I'd like to set header where it's name is a string

Any idea how to do it? (I know of headerplus module but it's available only in Enterprise version)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745103662a4611427.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信