nginx wss 代理不起作用

nginx wss 代理不起作用

我正在尝试使用 nginx 运行 wss 反向代理,但当我尝试连接时,我收到错误,没有任何错误代码。当我关闭 ssl websocket 时,它开始正常工作。我的 nginx 配置:

server {
        listen 8082 ssl;
        ssl_certificate <certificate>;
        ssl_certificate_key <certificate_key>;
        location / {
                proxy_pass http://localhost:24444/;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

相关内容