Use raw dir name to serve static web content (#6107)

This commit is contained in:
Chenlei Hu 2024-12-23 03:29:42 -05:00 committed by GitHub
parent 15564688ed
commit f18ebbd316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -714,9 +714,7 @@ class PromptServer():
self.app.add_routes(self.routes) self.app.add_routes(self.routes)
for name, dir in nodes.EXTENSION_WEB_DIRS.items(): for name, dir in nodes.EXTENSION_WEB_DIRS.items():
self.app.add_routes([ self.app.add_routes([web.static('/extensions/' + name, dir)])
web.static('/extensions/' + urllib.parse.quote(name), dir),
])
self.app.add_routes([ self.app.add_routes([
web.static('/', self.web_root), web.static('/', self.web_root),