I am trying to set up a front proxy in envoy where I pass the path in a header (test-header
in below example).
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: AUTO
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: backend
domains:
- "*"
routes:
- match:
prefix: "/service/1"
request_headers_to_add:
- header:
key: "test-path"
value: request.path
route:
cluster: service1
- match:
prefix: "/service/2"
route:
cluster: service2
http_filters:
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
I see there is a request.path
attribute in envoy https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/attributes
How can I pass this value to yaml config?