小编man*_*ana的帖子

为 HAProxy 响应设置标头

1.5 版中的新http-response add-header指令是该指令。正如文档中所写的那样- 这可以用于frontend,backendlisten

我在一个frontend部分中尝试做的事情:

use_backend some_backend                if some_condition
http-response add-header Vary Origin    if some_condition
Run Code Online (Sandbox Code Playgroud)

但这没有效果。放置在该backend部分中的同一行工作得很好。有人可以帮助我理解,我在这里缺少什么吗?我不明白,为什么这在该frontend部分不起作用。

My guess would be that within the fronted there is no response yet and so the directive fails. I tried using it before and after die use_backend directive.

haproxy

6
推荐指数
1
解决办法
8223
查看次数

标签 统计

haproxy ×1