Skip to content

The live preview keeps Server Actions (saas-parallel-baselining PB4) - #16

Merged
ruehowl merged 1 commit into
mainfrom
claude/preview-server-actions
Nov 4, 2026
Merged

ruehowl merged 1 commit into
mainfrom
claude/preview-server-actions

Conversation

@ruehowl

@ruehowl ruehowl commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Follow-up to #15. Behind orun.work's preview gateway the browser's Origin is the preview's host while next dev sees a local Host (127.0.0.1:3000), and Next.js refuses a Server Action whose origin it isn't told about ("Invalid Server Actions request", POST 500). allowedDevOrigins doesn't cover that check.

  • apps/web/next.config.mjs: experimental.serverActions.allowedOrigins for the preview's hosts (*.orun-preview.app, preview-gateway-stage.oruncloud.workers.dev), only when NODE_ENV === "development". next build runs with NODE_ENV=production, so the deployed site keeps its same-origin check.

The site has no Server Action today. A coding session that adds one (a form) keeps a working preview. Every Next.js baseline's preview gets the same entry.

Checked

  • From a clean clone with orun v2.96.0: orun preview start ready in 10 s; next dev lists the experiment (serverActions); GET / 200; through the gateway stand-in the frame loads and an edit hot-updates in 0.5 s; ~605 MB; orun preview stop frees the port.
  • Found on sfcc-commerce, whose pages call a Server Action on load: through the gateway stand-in Next refused it with "Invalid Server Actions request". That baseline's own PR shows the entry fixing it.

https://claude.ai/code/session_019PcpNV6SjymJBPv3nNkC4z


Generated by Claude Code

Behind orun.work's preview gateway 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 ("Invalid Server Actions
request"). allowedDevOrigins does not cover that check.

- apps/web/next.config.mjs: experimental.serverActions.allowedOrigins for
  the preview's hosts (*.orun-preview.app,
  preview-gateway-stage.oruncloud.workers.dev), only when
  NODE_ENV=development. `next build` runs with NODE_ENV=production, so the
  deployed site keeps its same-origin check.

The site has no Server Action today; a coding session that adds one (a
form) keeps a working preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PcpNV6SjymJBPv3nNkC4z
@ruehowl
ruehowl marked this pull request as ready for review November 4, 2026 20:51
@ruehowl
ruehowl merged commit 9a6b48c into main Nov 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants