import type {NextConfig} from 'next' import createNextIntlPlugin from 'next-intl/plugin' import {headers} from 'next/headers' const withNextIntl = createNextIntlPlugin({ experimental: { createMessagesDeclaration: './messages/uk.json' } }) export const routesToRewrite = ['about-us', 'privacy-policy', 'offer-contract'] const nextConfig: NextConfig = { // async headers() { // return [ // { // source: '/(.*)', // headers: [ // { // key: 'X-Frame-Options', // value: 'allow-from bw.amok.space' // } // ] // } // ] // }, experimental: { authInterrupts: true // serverActions: { // bodySizeLimit: '20mb' // } // // staleTimes: { // dynamic: 30, // static: 180 // } }, images: { formats: ['image/avif', 'image/webp'], dangerouslyAllowSVG: true, //unoptimized: true, remotePatterns: [ { protocol: 'https', hostname: '*' } ] }, async rewrites() { return [ { source: `/:locale/:slug(${routesToRewrite.join('|')})`, destination: '/:locale/pages/:slug' } ] } } export default withNextIntl(nextConfig)