Put wdb behind a reverse proxy like traefik
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
We use `traefik` for our project and so we put wdb behind it. To make it clean we setup traefik to bind port 1984 to a specific virtualhost for wdb.
It work, except when wdb GUI try to fetch /status (or others URL) which immediately close the connexion.
Error : wdb_server/__init__.py:118 "self.warn('Origin and host are not the same, closing websocket...')"
(by the way self.warn does not exists)
After some investigation, we found that `X-Forwarded-Proto` is "ws" whereas wdb check for "http"
We fix that by forcing traefik to set request header `X-Forwarded-Proto` to `http`. But it seems not to be a good fix or something expected.
Can you provide some documentation on how to setup wdb with a reverse proxy ?
Thanks
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with wdb_server/__init__.py and the reverse-proxy behavior described for /status, including the Origin, Host, and X-Forwarded-Proto checks. Document a supported Traefik/reverse-proxy setup for WebSocket requests and make the expected configuration and successful wdb GUI behavior clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100