Skip to content
Open
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
12 changes: 12 additions & 0 deletions frontend/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import type { NextConfig } from "next";

// Hosts allowed to load /_next/* dev resources from this dev server.
// Next.js 16 blocks cross-origin dev requests by default; without this,
// running `next dev` behind any reverse proxy or non-localhost origin
// silently breaks HMR and React hydration.
// Set ALLOWED_DEV_ORIGINS as a comma-separated list, e.g.
// ALLOWED_DEV_ORIGINS=bigset.example.com,staging.example.com
const allowedDevOrigins = (process.env.ALLOWED_DEV_ORIGINS || "")
.split(",")
.map((s) => s.trim())
.filter(Boolean);

const nextConfig: NextConfig = {
allowedDevOrigins,
async rewrites() {
return [
{
Expand Down