websocket连接,返回Error during WebSocket handshake: Unexpected response code: 302

前端连接websocket,所有的filter都已经通过
endpoint为图片说明

nginx也配置了


location ^~ /rest/v4/vphant/websocket/ {
                    proxy_read_timeout 900s;
                    #proxy_send_timeout 900s;
                    proxy_pass http://127.0.0.1:7001;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection "upgrade";
        }

但是返回了302错误码,有大佬碰到过吗

你的问题应该跟这个类似 https://codesolver.cn/post/detail?id=6

把WebSocket的地址改成一下,后面的不要。你试试