Which or server framework are you currently using to host this application?
If you are using Nginx as a reverse proxy, you must explicitly tell it to forward the Upgrade and Connection headers. By default, Nginx does not do this. Add or update your location block in your nginx.conf file:
RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule /(.*) ws://localhost:8080/$1 [P,L] Use code with caution. Copied to clipboard ☁️ Cloud Providers & Load Balancers