nodejs websocket 403 错误,是头文件的问题……需要加上头文件

2020-07-11 17:23 2023-12-03 18:24 标签:websocket

client.connect('ws://123.207.167.163:9010/ajaxchattest', null, null, {
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "zh-CN,zh;q=0.9",
"Cache-Control": "no-cache",
"Connection": "Upgrade",
"Host": "123.207.167.163:9010",
"Origin": "http://coolaf.com",
"Pragma": "no-cache",
"Sec-WebSocket-Extensions": "permessage-deflate; client_max_window_bits",
"Sec-WebSocket-Key": "/JOQfPb/9h5kWjVAO1Eryg==",
"Sec-WebSocket-Version": "13",
"Upgrade": "websocket",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
}, null);


压缩解压