Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Oct 30, 2023
1 parent 7e9282d commit a13f14c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type EdgeSSRLoaderQuery = {
middlewareConfig: string
serverActions?: {
bodySizeLimit?: SizeLimit
allowedForwardingHosts?: string[]
allowedForwardedHosts?: string[]
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function getRender({
serverActionsManifest?: any
serverActions?: {
bodySizeLimit?: SizeLimit
allowedForwardingHosts?: string[]
allowedForwardedHosts?: string[]
}
config: NextConfigComplete
buildId: string
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/server/app-render/action-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export async function handleAction({
requestStore: RequestStore
serverActions?: {
bodySizeLimit?: SizeLimit
allowedForwardingHosts?: string[]
allowedForwardedHosts?: string[]
}
ctx: AppRenderContext
}): Promise<
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/server/app-render/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ export interface RenderOptsPartial {
) => Promise<NextConfigComplete>
serverActions?: {
bodySizeLimit?: SizeLimit
allowedForwardingHosts?: string[]
allowedForwardedHosts?: string[]
}
allowedForwardingHosts?: string[]
allowedForwardedHosts?: string[]
params?: ParsedUrlQuery
isPrefetch?: boolean
ppr: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/base-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ type BaseRenderOpts = {
clientReferenceManifest?: ClientReferenceManifest
serverActions?: {
bodySizeLimit?: SizeLimit
allowedForwardingHosts?: string[]
allowedForwardedHosts?: string[]
}
serverActionsManifest?: any
nextFontManifest?: NextFontManifest
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/server/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ export const configSchema: zod.ZodType<NextConfig> = 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<string, any>
extensionAlias: z.record(z.string(), z.any()).optional(),
externalDir: z.boolean().optional(),
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export interface ExperimentalConfig {
* @example
* ["my-reverse-proxy.com"]
*/
allowedForwardingHosts?: string[]
allowedForwardedHosts?: string[]
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/server/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app-dir/actions/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
},
experimental: {
serverActions: {
allowedForwardingHosts: ['safe.com'],
allowedForwardedHosts: ['safe.com'],
},
},
}

0 comments on commit a13f14c

Please sign in to comment.