-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
1.golang implementation code
url := "wss://wspap.okx.com:8443/ws/v5/public"
requestHeader := http.Header{}
requestHeader.Set("Origin", "https://wspap.okx.com")
dialer := websocket.Dialer{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
EnableCompression: true,
HandshakeTimeout: 45 * time.Second,
}
conn, resp, err := dialer.DialContext(
context.Background(),
url,
requestHeader,
)
request header:
`Connection: Upgrade
Sec-WebSocket-Key: w8Nxuu9f9XmCGhjx8JGCbQ==
Sec-WebSocket-Version: 13
Origin: https://wspap.okx.com
Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; client_no_context_takeover
Upgrade: websocket
`
Origin: Plus or minus, it's 403
2 python code, python code is normal:
uri = "wss://wspap.okx.com:8443/ws/v5/public"
async with websockets.connect(uri) as websocket:
print("Connected to OKX WebSocket server")
3. postman is normal, too
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response