【问题标题】:haproxy - add current port to headerhaproxy - 将当前端口添加到标头
【发布时间】:2012-07-06 12:41:28
【问题描述】:

我想将当前端口号添加到标题中。 我试过了:

reqadd      port:\ dst_port

但它添加了dst_port 而不是数字。

有什么方法可以添加变量 dst_port 做头部吗?

【问题讨论】:

    标签: linux proxy apache haproxy


    【解决方案1】:

    试试:

    http-request set-header X-Port %[dst_port]

    (应该使用 haproxy 1.5)

    【讨论】:

    • user2414223 你救了我的命!我正在寻找一些不同的配置。我试过: http-request set-header X-Port %[src_port] ,它似乎运行良好!现在我可以使用 %{X-Port}i Great! 登录 Apache 源端口!
    猜你喜欢
    • 1970-01-01
    • 2018-11-24
    • 2021-09-10
    • 1970-01-01
    • 1970-01-01
    • 2023-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多