mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Ignore trailing slash in Origin header
See gh-26892
This commit is contained in:
@@ -551,6 +551,9 @@ public class CorsConfiguration {
|
||||
if (!StringUtils.hasText(requestOrigin)) {
|
||||
return null;
|
||||
}
|
||||
if (requestOrigin.endsWith("/")) {
|
||||
requestOrigin = requestOrigin.substring(0, requestOrigin.length() - 1);
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(this.allowedOrigins)) {
|
||||
if (this.allowedOrigins.contains(ALL)) {
|
||||
validateAllowCredentials();
|
||||
|
||||
Reference in New Issue
Block a user