customResponseHeaders / customRequestHeaders是否与键值存储(etcd)一起使用?

时间:2018-03-08 05:56:24

标签: traefik

我设置了这个键:

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

我尝试了很多大写和其他内容的组合。但我甚至不确定trafik的自定义标题内容是否像etcd这样的键值存储支持。是吗?

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

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

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

1 个答案:

答案 0 :(得分:0)

我从松弛的渠道中发现,像etcd这样的键值存储不支持自定义标头。但它计划在v1.6。