stuff done
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type {NextConfig} from 'next'
|
||||
import createNextIntlPlugin from 'next-intl/plugin'
|
||||
import {headers} from 'next/headers'
|
||||
|
||||
const withNextIntl = createNextIntlPlugin({
|
||||
experimental: {
|
||||
@@ -7,7 +8,22 @@ const withNextIntl = createNextIntlPlugin({
|
||||
}
|
||||
})
|
||||
|
||||
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: {
|
||||
@@ -18,7 +34,6 @@ const nextConfig: NextConfig = {
|
||||
// static: 180
|
||||
// }
|
||||
},
|
||||
|
||||
images: {
|
||||
formats: ['image/avif', 'image/webp'],
|
||||
dangerouslyAllowSVG: true,
|
||||
@@ -29,6 +44,15 @@ const nextConfig: NextConfig = {
|
||||
hostname: '*'
|
||||
}
|
||||
]
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: `/:locale/:slug(${routesToRewrite.join('|')})`,
|
||||
|
||||
destination: '/:locale/pages/:slug'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user