/** @type {import('next').NextConfig} */ const nextConfig = { output: "standalone", // Keep internal locale rewrites on the original origin, including 127.0.0.1 previews in Next 14. skipMiddlewareUrlNormalize: true, async headers() { return ['admin', 'dashboard', 'login', 'payment', 'create-order'].flatMap(segment => [ `/${segment}/:path*`, `/:locale(de|fr|es|it|pt|zh)/${segment}/:path*`, ].map(source => ({ source, headers: [{ key: 'X-Robots-Tag', value: 'noindex, nofollow' }] }))); }, async rewrites() { return [ { source: '/api/:path*', destination: `${process.env.NEXT_PUBLIC_API_URL}/api/:path*`, }, ]; }, eslint: { ignoreDuringBuilds: true, }, }; module.exports = nextConfig;