服务器nginx小程序socket聊天报错301?
发布于 6 年前 作者 yan07 4180 次浏览 来自 官方Issues

ocation ~ .*\.(js|css)?$

    {

        expires      12h;

        error_log off;

        access_log /dev/null; 

    }

     location /wss/

        {

            proxy_pass http://127.0.0.1:19967;

            proxy_set_header X-Real-IP $remote_addr;

            proxy_set_header Host $host;

            proxy_set_header X-Forwarded-Proto https;

            proxy_http_version 1.1;

            proxy_set_header Upgrade $http_upgrade;

            proxy_set_header Connection “upgrade”;

            rewrite /wss/(.*) /$1 break;

            proxy_redirect off;

        }

以上是我的nginx配置,可是始终报错

以下是我的小程序请求代码

回到顶部