Skip to content

Commit

Permalink
Also consider /.*/ a wildcard in CORSFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Nov 12, 2024
1 parent c3b729e commit 29e9cc6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ public static boolean isConfiguredWithWildcard(Optional<List<String>> optionalLi
}

private static boolean isOriginConfiguredWithWildcard(Optional<List<String>> origins) {
return !origins.isEmpty() && origins.get().size() == 1 && "*".equals(origins.get().get(0));
if (origins.isEmpty() || origins.get().size() != 1) {
return false;
}

String origin = origins.get().get(0);

return "*".equals(origin) || "/.*/".equals(origin);
}

/**
Expand Down

0 comments on commit 29e9cc6

Please sign in to comment.