diff --git a/packages/gitbook-v2/next.config.mjs b/packages/gitbook-v2/next.config.mjs index f3d6ae78e..acf792d56 100644 --- a/packages/gitbook-v2/next.config.mjs +++ b/packages/gitbook-v2/next.config.mjs @@ -6,6 +6,12 @@ const nextConfig = { experimental: { useCache: true, + serverActions: { + // Allow all origins for server actions + // as we serve content on a lot of domains + // Server actions are secured by the middleware. + allowedOrigins: ['*', '*.*', '*.*.*', '*.*.*.*', '*.*.*.*.*'], + }, }, env: { diff --git a/packages/gitbook-v2/open-next.config.ts b/packages/gitbook-v2/open-next.config.ts index 27ebb6331..a52461857 100644 --- a/packages/gitbook-v2/open-next.config.ts +++ b/packages/gitbook-v2/open-next.config.ts @@ -25,12 +25,6 @@ const config = { dangerous: { enableCacheInterception: false, }, - - experimental: { - serverActions: { - allowedOrigins: ['*', '*.*', '*.*.*', '*.*.*.*', '*.*.*.*.*'], - }, - }, }; export default config;