Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ spring:

This listing adds `X-Request-red:blue` header to the downstream request's headers for all matching requests.

NOTE: The shortcut notation (`AddRequestHeader=Name, Value`) parses the value on the first comma, so header values that contain a comma must use the expanded (`name`/`value` args) form:
+
[source,yaml]
----
filters:
- name: AddRequestHeader
args:
name: X-My-Header
value: "Value, with comma"
----

`AddRequestHeader` is aware of the URI variables used to match a path or host.
URI variables may be used in the value and are expanded at runtime.
The following example configures an `AddRequestHeader` `GatewayFilter` that uses a variable:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `Retry` `GatewayFilter` factory supports the following parameters:
* `retries`: The number of retries that should be attempted.
* `statuses`: The HTTP status codes that should be retried, represented by using `org.springframework.http.HttpStatus`.
* `methods`: The HTTP methods that should be retried, represented by using `org.springframework.http.HttpMethod`.
* `series`: The series of status codes to be retried, represented by using `org.springframework.http.HttpStatus.Series`.
* `series`: The series of status codes to be retried, represented by using `org.springframework.http.HttpStatus.Series`. When both `series` and `statuses` are set, a response is retried only if it matches the series AND is listed in `statuses`. To retry based on specific status codes without any series restriction, set `series` to an empty list (or `null` in YAML).
* `exceptions`: A list of thrown exceptions that should be retried.
* `backoff`: The configured exponential backoff for the retries.
Retries are performed after a backoff interval of `firstBackoff * (factor ^ n)`, where `n` is the iteration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ class RouteConfiguration {

This listing adds `X-Request-red:blue` header to the downstream request's headers for all matching requests.

NOTE: The shortcut notation (`AddRequestHeader=Name, Value`) parses the value on the first comma, so header values that contain a comma must use the expanded (`name`/`value` args) form:
+
[source,yaml]
----
filters:
- name: AddRequestHeader
args:
name: X-My-Header
value: "Value, with comma"
----

`AddRequestHeader` is aware of the URI variables used to match a path or host.
URI variables may be used in the value and are expanded at runtime.
The following example configures an `AddRequestHeader` filter that uses a variable:
Expand Down