Describe the bug
Flask-SocketsIO + Flask, attempts to use websockets as transport results in a 400 response code and a traceback on the client side, using simple-websocket as the WS framework and NGINX as the reverse proxy
Nginx config is as follows
What i've tried so far
Changing the https:// in the sock.connect() call to wss://
Modifying the order of the proxy directives in NGINX
Adding HTTP version directive in NGINX
Describe the bug Flask-SocketsIO + Flask, attempts to use websockets as transport results in a 400 response code and a traceback on the client side, using
simple-websocket
as the WS framework and NGINX as the reverse proxy Nginx config is as followsExpected behavior Website upgrades to WSS for the connection between the site and the bot
Actual behavior Client throws the below traceback and the website refuses the upgrade
Logs Python-SocketIO client (A discord bot)
Flask-SocketIO server (A flask app)
What i've tried so far Changing the
https://
in thesock.connect()
call towss://
Modifying the order of the proxy directives in NGINX Adding HTTP version directive in NGINX