From d855cfb65c32a61c23d4d2aa0e297e7329622c17 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 4 May 2023 10:10:23 +0000 Subject: [PATCH] render app pages with original url --- .../next-swc/crates/next-core/js/src/entry/app-renderer.tsx | 2 +- packages/next-swc/crates/next-core/js/types/turbopack.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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]>