diff --git a/next.config.mjs b/next.config.mjs index f066f1c8ad..ac673e5148 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -8,7 +8,7 @@ const nextConfig = { output: "standalone", serverExternalPackages: ["better-sqlite3", "zod"], transpilePackages: ["@omniroute/open-sse"], - allowedDevOrigins: ["192.168.*"], + allowedDevOrigins: ["localhost", "127.0.0.1", "192.168.*"], typescript: { // TODO: Re-enable after fixing all sub-component useTranslations scope issues ignoreBuildErrors: true, diff --git a/tests/unit/dev-origins-config.test.mjs b/tests/unit/dev-origins-config.test.mjs new file mode 100644 index 0000000000..e852791e74 --- /dev/null +++ b/tests/unit/dev-origins-config.test.mjs @@ -0,0 +1,8 @@ +import test from "node:test"; +import assert from "node:assert/strict"; + +test("next config allows loopback dev origins alongside LAN access", async () => { + const { default: nextConfig } = await import("../../next.config.mjs"); + + assert.deepEqual(nextConfig.allowedDevOrigins, ["localhost", "127.0.0.1", "192.168.*"]); +});