coder / coder/websocket

WebSocket Dial Handshake 403 When Connecting to Server Written Using x/net/websocket

Đang mở
#461 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
5.5k
Fork
372
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

We have a simplistic example websocket server written using this boilerplate in the labstack echo cookbook: https://echo.labstack.com/docs/cookbook/websocket#server

It's currently using `x/net/websocket`. On the client side that connects to this example server, I tried to swap out our `x/net/websocket` implementation for `nhooyr/websocket`, but when `websocket.Dial` is called, the handshake fails with this 403 error. I'm not sure why this is, as the default CORS for `echo` is to allow everything and if I swap back to the dialer in `x/net/websocket`, it works fine. Just in case, I've tried to provide a custom HTTP client with a custom transport that sets `InsecureSkipVerify: true` via the `DialOptions`, but this also did not work.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.