Skip to content

Commit ffd8e96

Browse files
authored
Merge pull request #3813 from plotly/bugfix/websockets-behind-proxy
Bugfix: websockets use incorrect pathname when deployed behind proxy
2 parents 578c313 + 4028449 commit ffd8e96

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
66

77
### Fixed
88
- [#3805](https://github.com/plotly/dash/pull/3805) Fix FastAPI POST routes deadlock caused by middleware consuming request body. Fixes [#3801](https://github.com/plotly/dash/issues/3801).
9+
- [#3813](https://github.com/plotly/dash/pull/3813) Fix websockets using incorrect path when deployed behind a proxy
910

1011
## [4.2.0] - 2026-06-01 - *The Freedom Update*
1112

dash/backends/_fastapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ def serve_websocket_callback(self, dash_app: "Dash"):
682682
dash_app: The Dash application instance
683683
"""
684684
# pylint: disable=too-many-statements,too-many-locals
685-
ws_path = dash_app.config.requests_pathname_prefix + "_dash-ws-callback"
685+
ws_path = dash_app.config.routes_pathname_prefix + "_dash-ws-callback"
686686

687687
# Get allowed origins from dash app config
688688
allowed_origins = getattr(

dash/backends/_quart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def serve_websocket_callback(self, dash_app: "Dash"):
516516
dash_app: The Dash application instance
517517
"""
518518
# pylint: disable=too-many-statements,too-many-locals
519-
ws_path = dash_app.config.requests_pathname_prefix + "_dash-ws-callback"
519+
ws_path = dash_app.config.routes_pathname_prefix + "_dash-ws-callback"
520520
# pylint: disable=protected-access
521521
allowed_origins = getattr(dash_app, "_websocket_allowed_origins", [])
522522

0 commit comments

Comments
 (0)