allow root path

This commit is contained in:
miloschwartz 2025-05-09 17:37:55 -04:00
parent e9cc48a3ae
commit caded23b51
No known key found for this signature in database
4 changed files with 96 additions and 12 deletions

View file

@ -9,6 +9,10 @@ export function isValidIP(ip: string): boolean {
}
export function isValidUrlGlobPattern(pattern: string): boolean {
if (pattern === "/") {
return true;
}
// Remove leading slash if present
pattern = pattern.startsWith("/") ? pattern.slice(1) : pattern;