From fb211e09fa2e8a7dc18de18d40bdcd462ccc2fe3 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 8 Jan 2025 13:46:03 +0100 Subject: [PATCH] fix(dev): avoid rewrite with baseURL --- src/core/dev-server/server.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/core/dev-server/server.ts b/src/core/dev-server/server.ts index 7fd90cef37..5d1b5bce7a 100644 --- a/src/core/dev-server/server.ts +++ b/src/core/dev-server/server.ts @@ -12,7 +12,6 @@ import { createError, eventHandler, fromNodeMiddleware, - sendRedirect, toNodeListener, } from "h3"; import { type ProxyServerOptions, createProxyServer } from "httpxy"; @@ -237,16 +236,6 @@ export function createDevServer(nitro: Nitro): NitroDevServer { app.use( eventHandler(async (event) => { await reloadPromise; - if ( - nitro.options.baseURL?.length > 1 && - !event.path.startsWith(nitro.options.baseURL) - ) { - return sendRedirect( - event, - joinURL(nitro.options.baseURL, event.path), - 307 - ); - } const address = getWorkerAddress(); if (!address) { const error = lastError || createError("Worker not ready");