Skip to content

Commit 29dc7cc

Browse files
committed
Fix next.js configuration for serverActions
1 parent 80237c3 commit 29dc7cc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/gitbook-v2/next.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
const nextConfig = {
77
experimental: {
88
useCache: true,
9+
serverActions: {
10+
// Allow all origins for server actions
11+
// as we serve content on a lot of domains
12+
// Server actions are secured by the middleware.
13+
allowedOrigins: ['*', '*.*', '*.*.*', '*.*.*.*', '*.*.*.*.*'],
14+
},
915
},
1016

1117
env: {

packages/gitbook-v2/open-next.config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ const config = {
2525
dangerous: {
2626
enableCacheInterception: false,
2727
},
28-
29-
experimental: {
30-
serverActions: {
31-
allowedOrigins: ['*', '*.*', '*.*.*', '*.*.*.*', '*.*.*.*.*'],
32-
},
33-
},
3428
};
3529

3630
export default config;

0 commit comments

Comments
 (0)