From 010a2eb7eb51ddf654524c23675772632608a8ce Mon Sep 17 00:00:00 2001 From: Stephan Zuercher Date: Fri, 8 Dec 2017 16:31:19 -0800 Subject: [PATCH 1/3] docs: document UPSTREAM_METADATA Signed-off-by: Stephan Zuercher --- docs/root/configuration/http_conn_man/headers.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/root/configuration/http_conn_man/headers.rst b/docs/root/configuration/http_conn_man/headers.rst index 59d56f2cc..36277e968 100644 --- a/docs/root/configuration/http_conn_man/headers.rst +++ b/docs/root/configuration/http_conn_man/headers.rst @@ -289,7 +289,7 @@ documentation. **Note:** Headers are appended to requests/responses in the following order: route level headers, virtual host level headers and finally global level headers. -Envoy additionally supports adding dynamic values to **request** and **response** headers. +Envoy additionally supports adding dynamic values to request and response headers. Supported dynamic values are: %CLIENT_IP% @@ -299,3 +299,12 @@ Supported dynamic values are: %PROTOCOL% The original protocol which is already added by Envoy as a :ref:`x-forwarded-proto ` request header. + +%UPSTREAM_METADATA(namespace, key[, key...])% + Populates the header with ref:`EDS endpoint metadata ` from the + upstream host selected by the router. Metadata may be selected from any namespace. In general, + metadata values may be strings, numbers, booleans, lists, nested structures, or null. Upstream + metadata values may be selected from nested structs by specifying multiple keys. Otherwise, + only string, boolean, and numeric values are supported. If the namespace or key(s) are not + found, or if the selected value is not a supported type, then no header is emitted. Leading + and trailing whitespace is ignored. Commas and backslashes (\) may be escaped with backslashes. From 77d9d7797b498804839c21208593c7c6f7f7bd0c Mon Sep 17 00:00:00 2001 From: Stephan Zuercher Date: Mon, 11 Dec 2017 10:38:56 -0800 Subject: [PATCH 2/3] switch format to JSON Signed-off-by: Stephan Zuercher --- docs/root/configuration/http_conn_man/headers.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/root/configuration/http_conn_man/headers.rst b/docs/root/configuration/http_conn_man/headers.rst index 36277e968..ef1801a15 100644 --- a/docs/root/configuration/http_conn_man/headers.rst +++ b/docs/root/configuration/http_conn_man/headers.rst @@ -294,17 +294,17 @@ Supported dynamic values are: %CLIENT_IP% The original client IP which is already added by Envoy as a - :ref:`x-forwarded-for ` request header. + :ref:`x-forwarded-for _x-forwarded-for>` request header. %PROTOCOL% The original protocol which is already added by Envoy as a :ref:`x-forwarded-proto ` request header. -%UPSTREAM_METADATA(namespace, key[, key...])% +%UPSTREAM_METADATA(["namespace", "key", ...])% Populates the header with ref:`EDS endpoint metadata ` from the upstream host selected by the router. Metadata may be selected from any namespace. In general, metadata values may be strings, numbers, booleans, lists, nested structures, or null. Upstream metadata values may be selected from nested structs by specifying multiple keys. Otherwise, only string, boolean, and numeric values are supported. If the namespace or key(s) are not - found, or if the selected value is not a supported type, then no header is emitted. Leading - and trailing whitespace is ignored. Commas and backslashes (\) may be escaped with backslashes. + found, or if the selected value is not a supported type, then no header is emitted. The + namespace and key(s) are specified as a JSON array of strings. From f8b9498ff57fb474c4e226afbe904616d0acbee5 Mon Sep 17 00:00:00 2001 From: Stephan Zuercher Date: Mon, 11 Dec 2017 10:47:59 -0800 Subject: [PATCH 3/3] fix inadvertent change Signed-off-by: Stephan Zuercher --- docs/root/configuration/http_conn_man/headers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/root/configuration/http_conn_man/headers.rst b/docs/root/configuration/http_conn_man/headers.rst index ef1801a15..a4bfd9201 100644 --- a/docs/root/configuration/http_conn_man/headers.rst +++ b/docs/root/configuration/http_conn_man/headers.rst @@ -294,7 +294,7 @@ Supported dynamic values are: %CLIENT_IP% The original client IP which is already added by Envoy as a - :ref:`x-forwarded-for _x-forwarded-for>` request header. + :ref:`x-forwarded-for ` request header. %PROTOCOL% The original protocol which is already added by Envoy as a