While using traefik 1.7, my websocket client (Socket-IO js) requesting a websocket connection via protocol upgrade, connection is established and kept open ... all fine...
After upgrading to traefik 2.0 uwsgi is giving me a 400 bad request on protocol upgrade request. When using gunicorn, the protocol upgrade is done with response code 101 but the connection is closed immediately.
traefik debug log says: "begin ServeHttp on request ... Forwarding this request to URL ... completed ServeHttp on request" and Socket-IO is falling back to long polling requests..which is generally working, but not wanted...
When doing the protocol upgrade without https, the connection is kept open and communication is possible over webocket connection.
So, anyone else has this problem, or could give me any advice or link how to properly configure such a setup?
can confirm the same issue. After a successful http request there is no upgrade to the websocket connection and instead socket-io downgrades to simple http polling. Had to go back to v1.7 for now.
I believe this could be also a related issue: How to make WebSockets work with Traefik 2.0 (setting up Rancher)
Btw. I've also looked into the traefik sources (forwarded_header.go (because I've searched for "ws" / "wss" protocol), and was about trying that solution too, but read your answer first