Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/web/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ export default function nextConfig(phase: string): NextConfig {
// hot reload and other /_next/* dev requests from an origin it is not told
// about. These are the preview's hosts, prod's and stage's.
allowedDevOrigins: ["*.orun-preview.app", "preview-gateway-stage.oruncloud.workers.dev"],
experimental: {
// Dev server only: behind orun.work's live Preview the browser's Origin
// is the preview's host while `next dev` sees a local Host, and Next.js
// refuses a Server Action from an origin it is not told about. `next
// build` runs with NODE_ENV=production, so production keeps its
// same-origin check.
...(process.env.NODE_ENV === "development"
? { serverActions: { allowedOrigins: ["*.orun-preview.app", "preview-gateway-stage.oruncloud.workers.dev"] } }
: {}),
},
// Only a production build reads the wrangler config: `next dev` keeps the
// template's own behaviour — `.env.local`, or its "connect Supabase"
// steps when there is none.
Expand Down
Loading