import os from "node:os"; const localNetworkHosts = Object.values(os.networkInterfaces()) .flat() .filter((address) => address && address.family === "IPv4" && !address.internal) .map((address) => address.address); /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, // Next.js protects development assets with an origin allowlist. Detect the // machine's current LAN addresses at startup so no local IP is hard-coded. allowedDevOrigins: localNetworkHosts, }; export default nextConfig;