nginx反向代理websocket wss failed: Error during WebSocket handshake: Unexpected response code: 403

failed: Error during WebSocket handshake: Unexpected response code: 403

在nginx配置proxy_set_header Origin '';

server {
        ...

        location /chat/ {
            proxy_pass http://backend;
            proxy_set_header Origin '';
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    }

 

你可能感兴趣的:(nginx反向代理websocket wss failed: Error during WebSocket handshake: Unexpected response code: 403)