在 https 配置项下如下配置
location = /websocket{
proxy_http_version 1.1;
proxy_pass http://websocket;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
等于号是因为需要精准匹配,以防误伤。根据需要添加。
如果对你有用,请点赞支持,你的支持,是我不断分享的动力。
浙公网安备 33010602011771号