在 https 配置项下如下配置

location = /websocket{
        proxy_http_version 1.1;
        proxy_pass http://websocket;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
     }

 等于号是因为需要精准匹配,以防误伤。根据需要添加。

posted on 2021-03-10 18:24  芝麻的西瓜  阅读(166)  评论(0编辑  收藏  举报