Skip to content

Commit 172671c

Browse files
committed
make RedirectRulesLoader wildcard '*' not match '/' (avoid matching subdirectories)
1 parent b06171e commit 172671c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/example/server/RedirectRulesLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private static String wildcardToRegex(String wildcard) {
3636
for (int i = 0; i < wildcard.length(); i++) {
3737
char c = wildcard.charAt(i);
3838
if (c == '*') {
39-
sb.append(".*");
39+
sb.append("[^/]*");
4040
} else {
4141
sb.append(Pattern.quote(String.valueOf(c)));
4242
}

0 commit comments

Comments
 (0)