【发布时间】:2020-07-22 11:23:24
【问题描述】:
我有一个有效的 LDS.yaml 文件,我想在标题中添加x-forwarded-for,因为在特使文档中说如果特使作为边缘服务器工作,它应该显示出来。但是当我使用这个best practice configurationhttps://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/edge时,没有显示标题x-forwarded-for
这是我的 LDS.yaml
version_info: "0"
resources:
# not enforcing https
- name: "http_listener"
"@type": type.googleapis.com/envoy.api.v2.Listener
address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
server_name: foo.example.com
request_timeout: 60s
use_remote_address: true # enabling x-forward-for
xff_num_trusted_hops: 1 # only show 1 x-forward-for
always_set_request_id_in_response: true # enable x-request-id
codec_type: auto
stat_prefix: ingress_http
http_filters:
- name: envoy.filters.http.router
typed_config: {}
route_config:
...
有什么问题吗?
谢谢!
【问题讨论】:
标签: envoyproxy