We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da464c3 commit 4f211f8Copy full SHA for 4f211f8
src/app.ts
@@ -1,4 +1,4 @@
1
-import { joinURL, withoutTrailingSlash } from "ufo";
+import { hasProtocol, joinURL, parseURL, withoutTrailingSlash } from "ufo";
2
import type { AdapterOptions as WSOptions } from "crossws";
3
import {
4
lazyEventHandler,
@@ -343,7 +343,8 @@ function websocketOptions(
343
return {
344
...appOptions.websocket,
345
async resolve(info) {
346
- const resolved = await evResolver(info.url);
+ const { pathname } = parseURL(info.url || "/");
347
+ const resolved = await evResolver(pathname);
348
return resolved?.handler?.__websocket__ || {};
349
},
350
};
0 commit comments