diff --git a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts index 64b686ddfb30d..100cda49afb14 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts @@ -28,7 +28,7 @@ export type EdgeSSRLoaderQuery = { middlewareConfig: string serverActions?: { bodySizeLimit?: SizeLimit - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] } } diff --git a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts index f15eadcab75be..02c2bc2c27aaa 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts @@ -57,7 +57,7 @@ export function getRender({ serverActionsManifest?: any serverActions?: { bodySizeLimit?: SizeLimit - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] } config: NextConfigComplete buildId: string diff --git a/packages/next/src/server/app-render/action-handler.ts b/packages/next/src/server/app-render/action-handler.ts index 75b1e5be07f7c..1c9a998b9ac2d 100644 --- a/packages/next/src/server/app-render/action-handler.ts +++ b/packages/next/src/server/app-render/action-handler.ts @@ -234,7 +234,7 @@ export async function handleAction({ requestStore: RequestStore serverActions?: { bodySizeLimit?: SizeLimit - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] } ctx: AppRenderContext }): Promise< @@ -284,7 +284,7 @@ export async function handleAction({ // These can be their reverse proxies or other safe hosts. if ( typeof host === 'string' && - serverActions?.allowedForwardingHosts?.includes(host) + serverActions?.allowedForwardedHosts?.includes(host) ) { // Ignore it } else { diff --git a/packages/next/src/server/app-render/types.ts b/packages/next/src/server/app-render/types.ts index dbbdd22060179..0e8134457b92a 100644 --- a/packages/next/src/server/app-render/types.ts +++ b/packages/next/src/server/app-render/types.ts @@ -134,9 +134,9 @@ export interface RenderOptsPartial { ) => Promise serverActions?: { bodySizeLimit?: SizeLimit - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] } - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] params?: ParsedUrlQuery isPrefetch?: boolean ppr: boolean diff --git a/packages/next/src/server/base-server.ts b/packages/next/src/server/base-server.ts index ad80b21109c7e..4e004e1e7b2a0 100644 --- a/packages/next/src/server/base-server.ts +++ b/packages/next/src/server/base-server.ts @@ -246,7 +246,7 @@ type BaseRenderOpts = { clientReferenceManifest?: ClientReferenceManifest serverActions?: { bodySizeLimit?: SizeLimit - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] } serverActionsManifest?: any nextFontManifest?: NextFontManifest diff --git a/packages/next/src/server/config-schema.ts b/packages/next/src/server/config-schema.ts index 7042d2e3cd507..25985c3a20cab 100644 --- a/packages/next/src/server/config-schema.ts +++ b/packages/next/src/server/config-schema.ts @@ -254,10 +254,10 @@ export const configSchema: zod.ZodType = z.lazy(() => serverActions: z .object({ bodySizeLimit: zSizeLimit.optional(), - allowedForwardingHosts: z.array(z.string()).optional(), + allowedForwardedHosts: z.array(z.string()).optional(), }) .optional(), - allowedForwardingHosts: z.array(z.string()).optional(), + allowedForwardedHosts: z.array(z.string()).optional(), // The original type was Record extensionAlias: z.record(z.string(), z.any()).optional(), externalDir: z.boolean().optional(), diff --git a/packages/next/src/server/config-shared.ts b/packages/next/src/server/config-shared.ts index 8434009181e1b..50711c8b99981 100644 --- a/packages/next/src/server/config-shared.ts +++ b/packages/next/src/server/config-shared.ts @@ -317,7 +317,7 @@ export interface ExperimentalConfig { * @example * ["my-reverse-proxy.com"] */ - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] } /** diff --git a/packages/next/src/server/render.tsx b/packages/next/src/server/render.tsx index 2301e25b47dde..be73d73e4df56 100644 --- a/packages/next/src/server/render.tsx +++ b/packages/next/src/server/render.tsx @@ -275,9 +275,9 @@ export type RenderOptsPartial = { serverComponents?: boolean serverActions?: { bodySizeLimit?: SizeLimit - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] } - allowedForwardingHosts?: string[] + allowedForwardedHosts?: string[] customServer?: boolean crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined images: ImageConfigComplete diff --git a/test/e2e/app-dir/actions/next.config.js b/test/e2e/app-dir/actions/next.config.js index 3d083da1606c5..d034321315005 100644 --- a/test/e2e/app-dir/actions/next.config.js +++ b/test/e2e/app-dir/actions/next.config.js @@ -6,7 +6,7 @@ module.exports = { }, experimental: { serverActions: { - allowedForwardingHosts: ['safe.com'], + allowedForwardedHosts: ['safe.com'], }, }, }