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