Skip to content

Commit 2c226bb

Browse files
authored
docs: update header mutation docs (#7187)
* update header mutation docs Signed-off-by: Huabing Zhao <[email protected]> * update docs Signed-off-by: Huabing Zhao <[email protected]> * sync to 1.5 docs Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Huabing Zhao <[email protected]>
1 parent 4ff441a commit 2c226bb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

site/content/en/latest/tasks/traffic/http-request-headers.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ refer to the [Gateway API documentation][].
1010
A [`RequestHeaderModifier` filter][req_filter] instructs Gateways to modify the headers in requests that match the rule
1111
before forwarding the request upstream. Note that the `RequestHeaderModifier` filter will only modify headers before the
1212
request is sent from Envoy to the upstream service and will not affect response headers returned to the downstream
13-
client.
13+
client. Header values support Envoy [format strings][envoy-format-strings], enabling dynamic values sourced from the
14+
request and connection metadata.
1415

1516
## Prerequisites
1617

@@ -445,6 +446,8 @@ spec:
445446
## Early Header Modification
446447

447448
In some cases, it could be necessary to modify headers before the proxy performs any sort of processing, routing or tracing. Envoy Gateway supports this functionality using the [ClientTrafficPolicy][] API.
449+
The same Envoy [format strings][envoy-format-strings] used with `RequestHeaderModifier` values also apply to early
450+
header modifications, allowing dynamic data to be populated ahead of routing.
448451

449452
A [ClientTrafficPolicy][] resource can be attached to a [Gateway][] resource to configure early header modifications for all its routes. In the following example we will demonstrate how early header modification can be configured.
450453

@@ -619,3 +622,4 @@ $ curl -vvv --header "Host: headers.example" "http://${GATEWAY_HOST}/get" --head
619622
[req_filter]: https://gateway-api.sigs.k8s.io/reference/spec#gateway.networking.k8s.io/v1.HTTPHeaderFilter
620623
[Gateway]: https://gateway-api.sigs.k8s.io/api-types/gateway/
621624
[ClientTrafficPolicy]: ../../../api/extension_types#clienttrafficpolicy
625+
[envoy-format-strings]: https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#config-access-log-format

site/content/en/v1.5/tasks/traffic/http-request-headers.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ refer to the [Gateway API documentation][].
1010
A [`RequestHeaderModifier` filter][req_filter] instructs Gateways to modify the headers in requests that match the rule
1111
before forwarding the request upstream. Note that the `RequestHeaderModifier` filter will only modify headers before the
1212
request is sent from Envoy to the upstream service and will not affect response headers returned to the downstream
13-
client.
13+
client. Header values support Envoy [format strings][envoy-format-strings], enabling dynamic values sourced from the
14+
request and connection metadata.
1415

1516
## Prerequisites
1617

@@ -445,6 +446,8 @@ spec:
445446
## Early Header Modification
446447

447448
In some cases, it could be necessary to modify headers before the proxy performs any sort of processing, routing or tracing. Envoy Gateway supports this functionality using the [ClientTrafficPolicy][] API.
449+
The same Envoy [format strings][envoy-format-strings] used with `RequestHeaderModifier` values also apply to early
450+
header modifications, allowing dynamic data to be populated ahead of routing.
448451

449452
A [ClientTrafficPolicy][] resource can be attached to a [Gateway][] resource to configure early header modifications for all its routes. In the following example we will demonstrate how early header modification can be configured.
450453

@@ -619,3 +622,4 @@ $ curl -vvv --header "Host: headers.example" "http://${GATEWAY_HOST}/get" --head
619622
[req_filter]: https://gateway-api.sigs.k8s.io/reference/spec#gateway.networking.k8s.io/v1.HTTPHeaderFilter
620623
[Gateway]: https://gateway-api.sigs.k8s.io/api-types/gateway/
621624
[ClientTrafficPolicy]: ../../../api/extension_types#clienttrafficpolicy
625+
[envoy-format-strings]: https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#config-access-log-format

0 commit comments

Comments
 (0)