Skip to content

Commit 5936c2d

Browse files
committed
fix(runtime): resolve next-data routes using normalized routing URL
1 parent b8c2315 commit 5936c2d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/runtime/server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,7 +3258,6 @@ const server = http.createServer(async (req, res) => {
32583258
req.headers['x-nextjs-data'] = '1';
32593259
}
32603260
const routingUrl = new URL(routingBaseUrl);
3261-
const resolveRoutesUrl = new URL(routingBaseUrl);
32623261
if (nextDataRoutePathname) {
32633262
routingUrl.pathname = nextDataRoutePathname;
32643263
}
@@ -3278,7 +3277,7 @@ const server = http.createServer(async (req, res) => {
32783277
if (runtimeRouting) {
32793278
resolvedRoutingResult = normalizeResolveRoutesResultShape(
32803279
await resolveRoutes({
3281-
url: resolveRoutesUrl,
3280+
url: routingUrl,
32823281
buildId,
32833282
basePath,
32843283
requestBody: createBodyStream(requestBody),
@@ -3323,7 +3322,7 @@ const server = http.createServer(async (req, res) => {
33233322
return middlewareResult;
33243323
},
33253324
}),
3326-
resolveRoutesUrl
3325+
routingUrl
33273326
);
33283327
}
33293328
replaceRequestHeaders(req, resolvedRequestHeaders);

0 commit comments

Comments
 (0)