My *_*Man 6 javascript websocket node.js cloudflare ws
好吧,我正在尝试连接到此 websocket ws://rustypot.com/socket.io/?EIO=4&transport=websocket 但不断收到 403 禁止错误。我尝试使用 NodeJS 后端和 Postman 进行连接,结果相同。所以,当你遇到这样的问题时,你应该做的第一件事就是检查标题,我就是这么做的。我所有的标题都很好:
Error: Unexpected server response: 403
Handshake Details
Request URL: https://rustypot.com/socket.io/?EIO=4&transport=websocket
Request Method: GET
Status Code: 403 Forbidden
Request Headers
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: HeibSZt/sW4ivlyCkdN87g==
Connection: Upgrade
Upgrade: websocket
Origin: https://rustypot.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Host: rustypot.com
Response Headers
Date: Sun, 26 Jun 2022 14:48:11 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: close
CF-Chl-Bypass: 1
Permissions-Policy: accelerometer=(),autoplay=(),camera=(),clipboard-read=(),clipboard-write=(),fullscreen=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Jan 1970 00:00:01 GMT
X-Frame-Options: SAMEORIGIN
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 7216be129b0484b0-LED
Run Code Online (Sandbox Code Playgroud)
但是如果我尝试通过一些 chrome 扩展连接到同一个该死的 websocket,它工作得很好:
任何帮助将非常感激。Cloudflare 正在踢我的屁股吗?我很困惑
| 归档时间: |
|
| 查看次数: |
9417 次 |
| 最近记录: |