spring:
+ cloud:
+ gateway:
+ routes:
+ - id: map_request_header_route
+ uri: https://example.org
+ filters:
+ - MapRequestHeader=Bar, X-Request-Foo
+From dc7e1e098340cd7dbb9e9cc1c9f17ad9d14bc030 Mon Sep 17 00:00:00 2001
From: buildmaster
The MapRequestHeader GatewayFilter Factory takes 'fromHeader' and 'toHeader' parameters. It creates a new named header (toHeader) and the value is extracted out of an existing named header (fromHeader) from the incoming http request. If the input header does not exist then the filter has no impact. If the new named header already exists then it’s values will be augmented with the new values.
+spring:
+ cloud:
+ gateway:
+ routes:
+ - id: map_request_header_route
+ uri: https://example.org
+ filters:
+ - MapRequestHeader=Bar, X-Request-Foo
+This will add X-Request-Foo:<values> header to the downstream request’s with updated values from the incoming http request Bar header.
The PrefixPath GatewayFilter Factory takes a single prefix parameter.