【发布时间】: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