Skip to main content

Route Filter Reference

Reference of the settings attached to one API instance (header modification and URL rewrite) and of the TLS settings of a gateway towards its backends.

Request header modification​

A RequestHeaderModifier filter on the route. Response headers have the same three parameters, applied to the response.

ParameterMeaning
addHeaders appended, even when the header already exists
setHeaders set, replacing an existing value
removeHeader names removed before forwarding
Strip what the backend must not trust

Remove from incoming requests the headers your backend treats as identity (x-user-id, x-client-id), then let the authentication rule set them.

Procedure: Header modification.

URL rewrite​

A URLRewrite filter on the route.

ParameterDefaultMeaning
hostname—Host name set on the forwarded request, such as backend.internal
path—The new path
pathTypeReplaceFullPathReplaceFullPath: the whole path. ReplacePrefixMatch: only the matched prefix
RequestpathTypepathForwarded
/v1/orders/42ReplacePrefixMatch on /v1//orders/42
/v1/orders/42ReplaceFullPath/orders/orders

Procedure: URL rewrite.

Backend TLS​

A setting of the gateway: how it connects to backends that expect TLS.

ParameterDefaultMeaning
minVersion1.2Lowest TLS version towards backends
maxVersion1.3Highest TLS version towards backends
clientCertificate—A TLS Certificate configuration the gateway presents, for mutual TLS
One client certificate per gateway

The client certificate is set on the gateway and presented to every backend that asks for one. Backends that require different client identities need different gateways.

Procedure: Backend TLS.