Skip to content

Commit bd99e26

Browse files
committed
docs: Fix global CORS configuration property path
The globalcors configuration properties were documented under the old path spring.cloud.gateway.globalcors, but were moved to spring.cloud.gateway.server.webflux.globalcors in a prior refactor. Updated both the YAML example and the inline property reference in the prose to use the correct path. Fixes gh-4103 Signed-off-by: Tarte <emprimula@gmail.com>
1 parent 5cbd0be commit bd99e26

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/cors-configuration.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ The following example configures CORS:
1717
spring:
1818
cloud:
1919
gateway:
20-
globalcors:
21-
cors-configurations:
22-
'[/**]':
23-
allowedOrigins: "https://docs.spring.io"
24-
allowedMethods:
25-
- GET
20+
server:
21+
webflux:
22+
globalcors:
23+
cors-configurations:
24+
'[/**]':
25+
allowedOrigins: "https://docs.spring.io"
26+
allowedMethods:
27+
- GET
2628
----
2729

2830
In the preceding example, CORS requests are allowed from requests that originate from `docs.spring.io` for all GET requested paths.
2931

30-
To provide the same CORS configuration to requests that are not handled by some gateway route predicate, set the `spring.cloud.gateway.globalcors.add-to-simple-url-handler-mapping` property to `true`.
32+
To provide the same CORS configuration to requests that are not handled by some gateway route predicate, set the `spring.cloud.gateway.server.webflux.globalcors.add-to-simple-url-handler-mapping` property to `true`.
3133
This is useful when you try to support CORS preflight requests and your route predicate does not evaluate to `true` because the HTTP method is `options`.
3234

3335
[[route-cors-configuration]]

0 commit comments

Comments
 (0)