diff --git a/packages/next/src/server/app-render/action-handler.ts b/packages/next/src/server/app-render/action-handler.ts index 35225d2334e252..58d4286f5feeca 100644 --- a/packages/next/src/server/app-render/action-handler.ts +++ b/packages/next/src/server/app-render/action-handler.ts @@ -488,9 +488,7 @@ export async function handleAction({ ? new URL(req.headers['origin']).host : undefined - const forwardedHostHeader = req.headers['x-forwarded-host'] as - | string - | undefined + const forwardedHostHeader = req.headers['x-forwarded-host']?.[0] const hostHeader = req.headers['host'] const host: Host = forwardedHostHeader ? {