Skip to content

Commit 4feeb0f

Browse files
Kehrlannrwinch
authored andcommitted
Docs: document effects of disabling CORS configurer
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
1 parent 82f87cf commit 4feeb0f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

docs/modules/ROOT/pages/reactive/integrations/cors.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[[webflux-cors]]
32
= CORS
43

@@ -75,3 +74,11 @@ fun springSecurityFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain
7574
}
7675
----
7776
======
77+
78+
[WARNING]
79+
====
80+
CORS is a browser-based security feature.
81+
By disabling CORS in Spring Security, you are not removing CORS protection from your browser.
82+
Instead, you are removing CORS support from Spring Security, and users will not be able to interact with your Spring backend from a cross-origin browser application.
83+
To fix CORS errors in your application, you must enable CORS support, and provide an appropriate configuration source.
84+
====

docs/modules/ROOT/pages/servlet/integrations/cors.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,11 @@ fun corsConfigurationSource(): UrlBasedCorsConfigurationSource {
183183
}
184184
----
185185
======
186+
187+
[WARNING]
188+
====
189+
CORS is a browser-based security feature.
190+
By disabling CORS in Spring Security with `.cors(CorsConfigurer::disable)`, you are not removing CORS protection from your browser.
191+
Instead, you are removing CORS support from Spring Security, and users will not be able to interact with your Spring backend from a cross-origin browser application.
192+
To fix CORS errors in your application, you must enable CORS support, and provide an appropriate configuration source.
193+
====

0 commit comments

Comments
 (0)