.. _envoy_v3_api_file_envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto: External Processing Filter (proto) ================================== .. _extension_envoy.filters.http.ext_proc: This extension has the qualified name ``envoy.filters.http.ext_proc`` .. note:: This extension is intended to be robust against both untrusted downstream and upstream traffic. .. tip:: This extension extends and can be used with the following extension categories: - :ref:`envoy.filters.http ` - :ref:`envoy.filters.http.upstream ` This extension must be configured with one of the following type URLs: - :ref:`type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExtProcPerRoute ` - :ref:`type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor ` External Processing Filter Processing Mode This configuration describes which parts of an HTTP request and response are sent to a remote server and how they are delivered. .. _envoy_v3_api_msg_extensions.filters.http.ext_proc.v3.ProcessingMode: extensions.filters.http.ext_proc.v3.ProcessingMode -------------------------------------------------- :repo:`[extensions.filters.http.ext_proc.v3.ProcessingMode proto] ` .. code-block:: json :force: { "request_header_mode": ..., "response_header_mode": ..., "request_body_mode": ..., "response_body_mode": ..., "request_trailer_mode": ..., "response_trailer_mode": ... } .. _envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ProcessingMode.request_header_mode: request_header_mode (:ref:`extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode `) How to handle the request header. Default is "SEND". .. _envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ProcessingMode.response_header_mode: response_header_mode (:ref:`extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode `) How to handle the response header. Default is "SEND". .. _envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ProcessingMode.request_body_mode: request_body_mode (:ref:`extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode `) How to handle the request body. Default is "NONE". .. _envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ProcessingMode.response_body_mode: response_body_mode (:ref:`extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode `) How do handle the response body. Default is "NONE". .. _envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ProcessingMode.request_trailer_mode: request_trailer_mode (:ref:`extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode `) How to handle the request trailers. Default is "SKIP". .. _envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ProcessingMode.response_trailer_mode: response_trailer_mode (:ref:`extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode `) How to handle the response trailers. Default is "SKIP". .. _envoy_v3_api_enum_extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode: Enum extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode ---------------------------------------------------------------------- :repo:`[extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode proto] ` Control how headers and trailers are handled .. _envoy_v3_api_enum_value_extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode.DEFAULT: DEFAULT *(DEFAULT)* ⁣The default HeaderSendMode depends on which part of the message is being processed. By default, request and response headers are sent, while trailers are skipped. .. _envoy_v3_api_enum_value_extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode.SEND: SEND ⁣Send the header or trailer. .. _envoy_v3_api_enum_value_extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode.SKIP: SKIP ⁣Do not send the header or trailer. .. _envoy_v3_api_enum_extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode: Enum extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode -------------------------------------------------------------------- :repo:`[extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode proto] ` Control how the request and response bodies are handled When body mutation by external processor is enabled, ext_proc filter will always remove the content length header in three cases below because content length can not be guaranteed to be set correctly: 1) STREAMED BodySendMode: header processing completes before body mutation comes back. 2) BUFFERED_PARTIAL BodySendMode: body is buffered and could be injected in different phases. 3) BUFFERED BodySendMode + SKIP HeaderSendMode: header processing (e.g., update content-length) is skipped. In Envoy's http1 codec implementation, removing content length will enable chunked transfer encoding whenever feasible. The recipient (either client or server) must be able to parse and decode the chunked transfer coding. (see `details in RFC9112 `_). In BUFFERED BodySendMode + SEND HeaderSendMode, content length header is allowed but it is external processor's responsibility to set the content length correctly matched to the length of mutated body. If they don't match, the corresponding body mutation will be rejected and local reply will be sent with an error message. .. _envoy_v3_api_enum_value_extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode.NONE: NONE *(DEFAULT)* ⁣Do not send the body at all. This is the default. .. _envoy_v3_api_enum_value_extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode.STREAMED: STREAMED ⁣Stream the body to the server in pieces as they arrive at the proxy. .. _envoy_v3_api_enum_value_extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode.BUFFERED: BUFFERED ⁣Buffer the message body in memory and send the entire body at once. If the body exceeds the configured buffer limit, then the downstream system will receive an error. .. _envoy_v3_api_enum_value_extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode.BUFFERED_PARTIAL: BUFFERED_PARTIAL ⁣Buffer the message body in memory and send the entire body in one chunk. If the body exceeds the configured buffer limit, then the body contents up to the buffer limit will be sent.