Nginx setting to allow wss sockets to connect

General idea of the config

https + proxy pass + virtual host

Nginx as a proxy causes a failure of wss:// connections to the backend server.

add these parameters to the proxy section :

 

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_set_header Host $host;

Voila’  !!!

😉 nJoy

 

Leave a Reply

Your email address will not be published. Required fields are marked *