datewise/react-router.config.ts
metatroncubeswdev 38e82f791e fix: allow form actions from the app domain behind the HTTPS proxy
React Router's CSRF check compared https Origin with the http URL seen behind Nginx,
rejecting every admin form save with 400.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 05:06:05 -04:00

10 lines
438 B
TypeScript

import type { Config } from "@react-router/dev/config";
export default {
ssr: true,
// Behind Nginx/Caddy the Node server sees http://, while the browser's Origin is https://, so
// React Router's CSRF check rejects every form action (400 Bad Request). List the hosts that may
// post: production, and the Shopify CLI dev tunnels.
allowedActionOrigins: ["datewise.metatronlabz.com", "*.trycloudflare.com"],
} satisfies Config;