fix: allow - in sub paths

This commit is contained in:
2026-04-12 13:09:46 +02:00
parent de2f150e96
commit 379defc3c0
+1 -1
View File
@@ -84,7 +84,7 @@ class StaplerRequestHandler(http.server.SimpleHTTPRequestHandler):
self.registry.remove(sub_path) self.registry.remove(sub_path)
def get_subpath(self) -> str | None: def get_subpath(self) -> str | None:
if (match := re.match(r"^\/(\w+)\/$", self.path)) is not None: if (match := re.match(r"^\/([\w-]+)\/$", self.path)) is not None:
return match.group(1) return match.group(1)
return None return None