Sami
Sami
CDCloudflare Developers
Created by Sami on 1/18/2024 in #workers-help
Error: internal error when replied to a get request with websocket upgrade headers with a websocket
In one of my subdomains, I am redirecting a post request containing websocket upgrade headers to another subdomain with 303 response and returning a websocket response from redirected url with
return new Response(null,{status:101,webSocket:client});
return new Response(null,{status:101,webSocket:client});
where code is essentially the example in the docs, websockets are created with WebSocketPair() However, after I return the response I am getting an Error: internal error on wrangler tail and 400 Bad request from client. Any suggestions on what to how to figure out what is wrong or debug? I tried to add try-catch to outermost layer that I have access to and it doesn't catch anything. Thanks!
1 replies
CDCloudflare Developers
Created by Sami on 1/18/2024 in #workers-help
Is there an example to create a websocket with a DO for an http/2 request?
I am trying to create and return a websocket to a specific request but if the request is made with http/2 I don't see Upgrade headers in the request. Is there an example of how to use websockets with http/2?
1 replies