Skip to content

Commit 41b1943

Browse files
committed
update docs
Signed-off-by: jiangyuan <joe469391363@gmail.com>
1 parent 97cc36e commit 41b1943

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/modules/ROOT/pages/spring-cloud-gateway/gatewayfilter-factories/addresponseheader-factory.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[addresponseheader-gatewayfilter-factory]]
22
= `AddResponseHeader` `GatewayFilter` Factory
33

4-
The `AddResponseHeader` `GatewayFilter` Factory takes a `name` and `value` parameter.
4+
The `AddResponseHeader` `GatewayFilter` Factory takes three parameters: `name`, `value` and `override`(default value is `true`) .
55
The following example configures an `AddResponseHeader` `GatewayFilter`:
66

77
.application.yml
@@ -15,9 +15,12 @@ spring:
1515
uri: https://example.org
1616
filters:
1717
- AddResponseHeader=X-Response-Red, Blue
18+
- AddResponseHeader=X-Response-Black, White, false
1819
----
1920

2021
This adds `X-Response-Red:Blue` header to the downstream response's headers for all matching requests.
22+
and if the response already contains the `X-Response-Black` header, this will not add the `X-Response-Black: White`
23+
header to the downstream response's headers for all matching requests.
2124

2225
`AddResponseHeader` is aware of URI variables used to match a path or host.
2326
URI variables may be used in the value and are expanded at runtime.

0 commit comments

Comments
 (0)