using websocket, in vue always reports the wrong handshake failure, and all my interfaces use proxyTable as a reverse proxy
proxyTable: {
"/api":{
target:"xxxxxxx",
changeOrigin: true,
pathRewrite: {
"^/api": "/"
}
},
because my agent is the http protocol and websocket is the ws protocol, I did not use this agent
let ws = new WebSocket("ws://xxxxxxxxx/websocket/11");
the interface using the proxy is like this
axios.get(`api/task/taskRunStart/${_id}/${value}`)
the permission settings made by the backend must be logged in in order to have permissions, but all my interfaces use reverse proxies, including the login page, which should be different between the two channels, so it leads to failure, and then the permissions are cancelled at the backend. I"ll get the data here, and that"s fine. How to solve this problem now? Permissions are definitely required
page error 302
how do I deal with this? Please give me your advice when using websocket for the first time!