Skip to content

Commit 6962521

Browse files
authored
avoid creating new URL
use already-existing h3 URL. might boost performance slightly
1 parent 7c8b6f3 commit 6962521

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/start/src/server/handler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ export function createBaseHandler(
3232
middleware,
3333
handler: async (e: H3Event) => {
3434
const event = getRequestEvent()!;
35-
const url = new URL(event.request.url);
36-
const pathname = url.pathname;
35+
const pathname = e.url.pathname;
3736

3837
const serverFunctionTest = join("/", SERVER_FN_BASE);
3938
if (pathname.startsWith(serverFunctionTest)) {

0 commit comments

Comments
 (0)