From e435ea4847be0a933d2eae0f74162440c7d8d090 Mon Sep 17 00:00:00 2001 From: Eitan Suez Date: Fri, 19 Apr 2024 15:45:31 -0500 Subject: [PATCH] docs: (#3137) show 'apply yaml' either from stdin, or from file using tabs Signed-off-by: Eitan Suez --- .../tasks/traffic/http-request-headers.md | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) diff --git a/site/content/en/latest/tasks/traffic/http-request-headers.md b/site/content/en/latest/tasks/traffic/http-request-headers.md index 05cb770c4a7d..c3e4efdfe260 100644 --- a/site/content/en/latest/tasks/traffic/http-request-headers.md +++ b/site/content/en/latest/tasks/traffic/http-request-headers.md @@ -24,6 +24,8 @@ does not have the header configured by the filter, then that header will be adde has the header configured by the filter, then the value of the header in the filter will be appended to the value of the header in the request. +{{< tabpane text=true >}} +{{% tab header="Apply from stdin" %}} ```shell cat <}} + The HTTPRoute status should indicate that it has been accepted and is bound to the example Gateway. @@ -107,6 +145,8 @@ will be added, but unlike [adding request headers](#adding-request-headers) whic the request already contains it, setting a header will cause the value to be replaced by the value configured in the filter. +{{< tabpane text=true >}} +{{% tab header="Apply from stdin" %}} ```shell cat <}} Querying `headers.example/get` should result in a `200` response from the example Gateway and the output from the example app should indicate that the upstream example app received the header `add-header` with the original value @@ -178,6 +253,8 @@ will be added, but unlike [adding request headers](#adding-request-headers) whic the request already contains it, setting a header will cause the value to be replaced by the value configured in the filter. +{{< tabpane text=true >}} +{{% tab header="Apply from stdin" %}} ```shell cat <}} Querying `headers.example/get` should result in a `200` response from the example Gateway and the output from the example app should indicate that the upstream example app received the header `add-header`, but the header @@ -243,6 +353,8 @@ $ curl -vvv --header "Host: headers.example" "http://${GATEWAY_HOST}/get" --head Headers can be added/set/removed in a single filter on the same HTTPRoute and they will all perform as expected +{{< tabpane text=true >}} +{{% tab header="Apply from stdin" %}} ```shell cat <}} [HTTPRoute]: https://gateway-api.sigs.k8s.io/api-types/httproute/ [HTTPRoute filters]: https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HTTPRouteFilter