// SPDX-FileCopyrightText: 2026 Progmasoft // SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1 import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "standalone", poweredByHeader: false, reactStrictMode: true, // ViGet's public coordinate contract accepts catalog roots with a trailing // slash. Host-aware proxy routing owns normalization for those URLs. skipTrailingSlashRedirect: true, typedRoutes: true, async rewrites() { const apiOrigin = process.env.PROGMAWEB_API_ORIGIN ?? "http://127.0.0.1:5085"; return [{ source: "/api/:path*", destination: `${apiOrigin}/api/:path*` }]; }, async headers() { return [ { source: "/(.*)", headers: [ { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" }, { key: "X-Content-Type-Options", value: "nosniff" }, { key: "X-Frame-Options", value: "DENY" }, { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()", }, ], }, ]; }, }; export default nextConfig;