Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions panel/io/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,15 @@ async def get(self, *args, **kwargs):
# Copied from bokeh 2.4.0, to fix directly in bokeh at some point.
def create_static_handler(prefix, key, app):
# patch
key = '/__patchedroot' if key == '/' else key
if key == '/':
key = '/__patchedroot'
route = prefix + "/static/(.*)"
else:
route = prefix + key + "/static/(.*)"

route = prefix
route += "/static/(.*)" if key == "/" else key + "/static/(.*)"
if app.static_path is not None:
return (route, StaticFileHandler, {"path" : app.static_path})
static_path = app.static_path
if static_path is not None:
return (route, StaticFileHandler, {"path": static_path})
return (route, StaticHandler, {})

bokeh.server.tornado.create_static_handler = create_static_handler
Expand Down