leistungsbilanz-ts/next.config.mjs
Grovy311 4f7a0c2a8c Local-only: allow cj-ki dev origin for HMR handshake
Not part of the cable-sizing proposal. next.config.mjs allowedDevOrigins
was scoped to the project owners own network; without cj-ki (192.168.0.133)
listed, Next.js 16 rejects the client HMR WebSocket handshake from this
host and the client-rendered pages (e.g. the circuit tree editor) hang on
their loading state forever, even though plain HTTP/API requests work
fine. Same root cause already documented for the sibling elt-planung-suite
project. Should not be carried over if this branch is proposed upstream.
2026-08-07 17:43:30 +02:00

30 lines
618 B
JavaScript

/** @type {import('next').NextConfig} */
const apiInternalUrl = (process.env.API_INTERNAL_URL || "http://localhost:3000").replace(/\/$/, "");
const nextConfig = {
allowedDevOrigins: [
"192.168.3.13",
"docker01.int.jappel.io",
"lb.jappel.io",
"192.168.0.133"
],
typescript: {
tsconfigPath: "./tsconfig.next.json",
},
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${apiInternalUrl}/api/:path*`,
},
{
source: "/health",
destination: `${apiInternalUrl}/health`,
},
];
},
};
export default nextConfig;