import type { NextConfig } from "next"; const api = process.env.API_URL ?? "http://localhost:3000"; /** * Public sites (photoreport.pt, shootyourmove.com...). One build serves every domain: the API decides the * organization and skin from the domain. Browsers reach the API through `/v1` on the site's own origin. */ const config: NextConfig = { reactStrictMode: true, poweredByHeader: false, productionBrowserSourceMaps: false, async rewrites() { return [{ source: "/v1/:path*", destination: `${api}/v1/:path*` }]; }, }; export default config;