Skip to content

Use routes_pathname_prefix for internal Alive URL in Dash app #3281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025
Merged
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
4 changes: 3 additions & 1 deletion dash/_jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ def run_app(
else:
requests_pathname_prefix = "/"

routes_pathname_prefix = app.config.get("routes_pathname_prefix", "/")

# FIXME Move config initialization to main dash __init__
# low-level setter to circumvent Dash's config locking
# normally it's unsafe to alter requests_pathname_prefix this late, but
Expand Down Expand Up @@ -355,7 +357,7 @@ def run():
self._servers[(host, port)] = server

# Wait for server to start up
alive_url = f"http://{host}:{port}{requests_pathname_prefix}_alive_{JupyterDash.alive_token}"
alive_url = f"http://{host}:{port}{routes_pathname_prefix}_alive_{JupyterDash.alive_token}"

def _get_error():
try:
Expand Down