diff --git a/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx b/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx index fdbea07b20562a..66e16f8f105a7a 100644 --- a/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx +++ b/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx @@ -245,7 +245,7 @@ async function runOperation(renderData: RenderData) { cssModules: {}, } const req: IncomingMessage = { - url: renderData.url, + url: renderData.originalUrl, method: renderData.method, headers: headersFromEntries(renderData.rawHeaders), } as any diff --git a/packages/next-swc/crates/next-core/js/types/turbopack.d.ts b/packages/next-swc/crates/next-core/js/types/turbopack.d.ts index cce40e027466aa..9c18f88f39fac3 100644 --- a/packages/next-swc/crates/next-core/js/types/turbopack.d.ts +++ b/packages/next-swc/crates/next-core/js/types/turbopack.d.ts @@ -4,6 +4,7 @@ export type RenderData = { params: Record method: string url: string + originalUrl: string path: string rawQuery: string rawHeaders: Array<[string, string]>