404 Errors when using prefix and without Trailing Slash in URL

Hi,

I have encountered an issue when accessing this app without a trailing slash in the URL:

import panel as pn

def app():
    return pn.pane.Markdown("# Hello from Panel with prefix!")

pn.serve(app, prefix="/myapp")

With http://localhost:61976/myapp/, everything works fine.

With http://localhost:61976/myapp (without the trailing slash), I receive several 404 errors related to missing static files, such as:

  • 404 GET /myapp/favicon.ico
  • 404 GET /static/extensions/panel/bundled/reactiveesm/es-module-shims@%5E1.10.0/dist/es-module-shims.min.js
  • 404 GET /static/js/bokeh.min.js
  • …and others.

Is there a way without needing a trailing slash in the URL?

Version is panel==1.8.0.

Thanks