There was an error while loading. Please reload this page.
onUpgrade
1 parent 20f539f commit fff60a0Copy full SHA for fff60a0
1 file changed
src/core/ws.ts
@@ -168,6 +168,13 @@ const WEBSOCKET_GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
168
169
interface WebSocketNamespace {
170
link: typeof createWebSocketLinkHandler
171
+ /**
172
+ * Request handler for the `upgrade` requests to the WebSocket protocol.
173
+ * This requires a WebSocket handler to be present to fire.
174
+ * @note This only affects Node.js as the `upgrade` request header is
175
+ * forbidden and cannot be read in the browser. Consider using the
176
+ * `WebSocket` API for establishing WebSocket connections in the browser.
177
+ */
178
onUpgrade: (info: {
179
requestId: string
180
request: Request
0 commit comments