Use the proxied url as the Jupyter server url - #3936
Open
Sanjays2402 wants to merge 1 commit into
Open
Conversation
When DASH_PROXY (or run(proxy=...)) is set, the app is served on host:port but reached through the proxy. run() already used the proxied url for the 'Dash is running on' message, but passed nothing to jupyter_dash.run_app(), so JupyterDash fell back to http://host:port for the external url and the inline iframe, which is unreachable behind a proxy. Derive server_url from the proxied half of the proxy string when the caller did not pass jupyter_server_url explicitly. Fixes plotly#3401
Sanjays2402
requested review from
KoolADE85,
T4rk1n,
camdecoster and
ndrezn
as code owners
August 2, 2026 11:21
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #3401.
When
DASH_PROXY(orrun(proxy=...)) is set, the app is served onhost:portbut reached through the proxy.run()already used the proxied url for the "Dash is running on" log line, but passed nothing tojupyter_dash.run_app(), so JupyterDash fell back tohttp://host:portfor both the external url and the inline iframe — unreachable behind the proxy.server_urlis now derived from the proxied half of the proxy string when the caller did not passjupyter_server_urlexplicitly.Contributor Checklist
jupyter_dash.run_app()tests/unit/test_configs.pypasses (the 2 unrelated failures in that file are missing built JS assets in my source checkout, identical before and after this change). The newtest_proxy_jupyter_server_urlfails without the fix (server_urlisNone) and passes with it.optionals
CHANGELOG.mdThis change was prepared with AI assistance; the regression test was run locally and fails without the fix.