【问题标题】:Does customResponseHeaders/customRequestHeaders work with key-value store (etcd)?customResponseHeaders/customRequestHeaders 是否与键值存储 (etcd) 一起使用?
【发布时间】:2023-04-06 19:45:01
【问题描述】:

我设置了这个键:

etcdctl set /production/traefik/frontends/blah/headers/customResponseHeaders/X-PoweredBy foo

但是当我curl blah 时,我在响应中看不到标题。

* Rebuilt URL to: blah/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to blah (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: blah
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Length: 34
< Content-Type: application/octet-stream
< Date: Thu, 08 Mar 2018 05:56:48 GMT
< Server: nginx/1.13.7
< 
* Connection #0 to host blah left intact

我尝试了许多大写字母和其他内容的组合。但我什至不确定 traefik 的自定义标头内容是否支持 etcd 等键值存储。是吗?

我知道我在我想要的前端成功设置了键,因为这有效(我在仪表板中看到它发生了变化):

etcdctl set /production/traefik/frontends/blah/passHostHeader false

我可以使用 etcd 设置自定义标头内容还是仅适用于 .toml 文件和 Docker 标签?

【问题讨论】:

    标签: traefik


    【解决方案1】:

    我从 slack 频道发现,像 etcd 这样的键值存储确实不支持自定义标头。但它计划用于 v1.6。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-26
      • 1970-01-01
      • 2023-03-24
      • 2011-05-13
      • 2019-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多