Websockets are not working anymore after changing a host in version v2.9.0
See original GitHub issueChecklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latest
docker image?
Yes
- Are you sure you’re not using someone else’s docker image?
Yes
Describe the bug
- A clear and concise description of what the bug is.
After the upgrade to version 2.9.0 websockets seems not work anymore (after a change while on version 2.9.0), when i switch back to version 2.8.1 and perform the following steps its working again.
1. click on my proxy host (the entry with the websocket toggle enabled) 2. Toggle (disable) websocket 3. Press save 4. click again on my proxy host 5. Toggle (enable) websocket 6. Press save 7. working
When i start the 2.9.0 container and follow the above steps the websockets are not working anymore.
- What version of Nginx Proxy Manager is reported on the login page?
v2.9.0
Additional context Error in chrome dev tools: “Unable to connect to ****.” websocket failed. Unfortunately i cloud not found any relevant log files.
I guess it has something todo with the following PR: https://github.com/jc21/nginx-proxy-manager/pull/1017
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Ah good pickup @jlesage - rookie move letting this go by on my part.
So from this explanation, I’ve committed this so anyone creating a custom location block without
proxy_set_header
directives will still have websocket support, though I can’t see why they would use websockets if not proxy’ing 🤷When this build is green (and not before, eta ~2 hours) anyone is welcome to test this change by using the
github-develop
docker tag. I won’t be able to test this myself for about 8 hours due to prior commitments.To test:
The issue has been introduced with the following change: https://github.com/jc21/nginx-proxy-manager/commit/421934efedd12ba047f78243fb25388a613e29f8
The
proxy_set_header
directives required for WebSocket cannot be moved out from thelocation
level. According to http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header:So because of the inclusion of
conf.d/include/proxy.conf
(which hasproxy_set_header
directives) underlocation
, the directives for WebSocket are ignored.