.. _envoy_v3_api_file_envoy/extensions/http/custom_response/redirect_policy/v3/redirect_policy.proto: Redirect Policy for Custom Response (proto) =========================================== .. _extension_envoy.http.custom_response.redirect_policy: This extension has the qualified name ``envoy.http.custom_response.redirect_policy`` .. note:: This extension is work-in-progress. Functionality is incomplete and it is not intended for production use. This extension has an unknown security posture and should only be used in deployments where both the downstream and upstream are trusted. .. tip:: This extension extends and can be used with the following extension category: - :ref:`envoy.http.custom_response ` This extension must be configured with one of the following type URLs: - :ref:`type.googleapis.com/envoy.extensions.http.custom_response.redirect_policy.v3.RedirectPolicy ` .. warning:: This API feature is currently work-in-progress. API features marked as work-in-progress are not considered stable, are not covered by the :ref:`threat model `, are not supported by the security team, and are subject to breaking changes. Do not use this feature without understanding each of the previous points. .. _envoy_v3_api_msg_extensions.http.custom_response.redirect_policy.v3.RedirectPolicy: extensions.http.custom_response.redirect_policy.v3.RedirectPolicy ----------------------------------------------------------------- :repo:`[extensions.http.custom_response.redirect_policy.v3.RedirectPolicy proto] ` Custom response policy to internally redirect the original response to a different upstream. .. code-block:: json :force: { "uri": ..., "redirect_action": {...}, "status_code": {...}, "response_headers_to_add": [], "request_headers_to_add": [], "modify_request_headers_action": {...} } .. _envoy_v3_api_field_extensions.http.custom_response.redirect_policy.v3.RedirectPolicy.uri: uri (`string `_) The Http URI to redirect the original request to, to get the custom response. It should be a full FQDN with protocol, host and path. Example: .. code-block:: yaml uri: https://www.mydomain.com/path/to/404.txt Precisely one of :ref:`uri `, :ref:`redirect_action ` must be set. .. _envoy_v3_api_field_extensions.http.custom_response.redirect_policy.v3.RedirectPolicy.redirect_action: redirect_action (:ref:`config.route.v3.RedirectAction `) Specify elements of the redirect url individually. Note: Do not specify the ``response_code`` field in ``redirect_action``, use ``status_code`` instead. The following fields in ``redirect_action`` are currently not supported, and specifying them will cause the config to be rejected: - ``prefix_rewrite`` - ``regex_rewrite`` Precisely one of :ref:`uri `, :ref:`redirect_action ` must be set. .. _envoy_v3_api_field_extensions.http.custom_response.redirect_policy.v3.RedirectPolicy.status_code: status_code (`UInt32Value `_) The new response status code if specified. This is used to override the status code of the response from the new upstream if it is not an error status. .. _envoy_v3_api_field_extensions.http.custom_response.redirect_policy.v3.RedirectPolicy.response_headers_to_add: response_headers_to_add (**repeated** :ref:`config.core.v3.HeaderValueOption `) HTTP headers to add to the response. This allows the response policy to append, to add or to override headers of the original response for local body, or the custom response from the remote body, before it is sent to a downstream client. Note that these are not applied if the redirected response is an error response. .. _envoy_v3_api_field_extensions.http.custom_response.redirect_policy.v3.RedirectPolicy.request_headers_to_add: request_headers_to_add (**repeated** :ref:`config.core.v3.HeaderValueOption `) HTTP headers to add to the request before it is internally redirected. .. _envoy_v3_api_field_extensions.http.custom_response.redirect_policy.v3.RedirectPolicy.modify_request_headers_action: modify_request_headers_action (:ref:`config.core.v3.TypedExtensionConfig `) Custom action to modify request headers before selection of the redirected route.