Skip to content

Commit f1279a7

Browse files
sithmeinsberyozkin
andauthored
Update docs/src/main/asciidoc/security-cors.adoc
Co-authored-by: Sergey Beryozkin <[email protected]>
1 parent 537e687 commit f1279a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/src/main/asciidoc/security-cors.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ For regular CORS requests, the filter denies access with an HTTP 403 status if t
3737
[NOTE]
3838
====
3939
Despite its name the CORS filter may also prevent CSRF attacks based on link:https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#using-standard-headers-to-verify-origin[Origin verification].
40-
Therefore, since `Origin` headers are set by the browser, you may want to consider using it instead of the xref:security-csrf-prevention.adoc[REST CSRF filter].
40+
Therefore, since an [Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Origin) header is expected to be set by the browser for cross-origin JavaScript and HTML form requests, you may want to consider using it instead of the xref:security-csrf-prevention.adoc[REST CSRF filter].
41+
42+
You must confirm that the browser does set an `Origin` header for cross-origin requests when accessing your application, especially with HTML forms, before using the CORS filter to prevent CSRF with the link:https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#using-standard-headers-to-verify-origin[Origin verification].
4143
====
4244

4345
For detailed configuration options, see the following Configuration Properties section.

0 commit comments

Comments
 (0)