match both forward slash and os seperator
This commit is contained in:
parent
cb71cbad54
commit
e46ace5044
@ -161,9 +161,8 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
if not pattern:
|
||||
return path
|
||||
|
||||
if not re.fullmatch(pattern, subPath):
|
||||
return path
|
||||
|
||||
subPath2 = subPath.replace(os.sep, "/")
|
||||
if re.fullmatch(pattern, subPath) or re.fullmatch(pattern, subPath2):
|
||||
newPath = os.path.join(addMgr.addonsFolder(), addonPath)
|
||||
return newPath
|
||||
|
||||
|
@ -149,6 +149,8 @@ class WebContent:
|
||||
f"/_addons/{addon_package}/web/my-addon.css")
|
||||
web_content.js.append(
|
||||
f"/_addons/{addon_package}/web/my-addon.js")
|
||||
|
||||
Note that '/' will also match the os specific path separator.
|
||||
"""
|
||||
|
||||
body: str = ""
|
||||
|
Loading…
Reference in New Issue
Block a user