2020-10-07 23:11:01 +02:00
|
|
|
module.exports = {
|
|
|
|
// target: 'experimental-serverless-trace',
|
2020-11-12 06:26:48 +01:00
|
|
|
// basePath: '/docs',
|
2020-11-17 22:46:46 +01:00
|
|
|
// trailingSlash: true,
|
2020-10-27 16:30:34 +01:00
|
|
|
i18n: {
|
2020-11-02 22:02:15 +01:00
|
|
|
// localeDetection: false,
|
2020-10-27 16:30:34 +01:00
|
|
|
locales: ['nl-NL', 'nl-BE', 'nl', 'fr-BE', 'fr', 'en-US', 'en'],
|
|
|
|
defaultLocale: 'en-US',
|
|
|
|
domains: [
|
|
|
|
{
|
|
|
|
// used for testing, this should not be needed in most cases
|
|
|
|
// as production domains should always use https
|
|
|
|
http: true,
|
|
|
|
domain: 'example.be',
|
|
|
|
defaultLocale: 'nl-BE',
|
|
|
|
locales: ['nl', 'nl-NL', 'nl-BE'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
http: true,
|
|
|
|
domain: 'example.fr',
|
|
|
|
defaultLocale: 'fr',
|
|
|
|
locales: ['fr-BE'],
|
|
|
|
},
|
|
|
|
],
|
2020-10-07 23:11:01 +02:00
|
|
|
},
|
2020-10-29 18:48:54 +01:00
|
|
|
async redirects() {
|
|
|
|
return [
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/en-US/redirect-1',
|
2020-10-29 18:48:54 +01:00
|
|
|
destination: '/somewhere-else',
|
|
|
|
permanent: false,
|
2020-11-14 04:35:42 +01:00
|
|
|
locale: false,
|
2020-10-29 18:48:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/nl/redirect-2',
|
2020-10-29 18:48:54 +01:00
|
|
|
destination: '/somewhere-else',
|
|
|
|
permanent: false,
|
2020-11-14 04:35:42 +01:00
|
|
|
locale: false,
|
2020-10-29 18:48:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/redirect-3',
|
2020-10-29 18:48:54 +01:00
|
|
|
destination: '/somewhere-else',
|
|
|
|
permanent: false,
|
|
|
|
},
|
2020-12-22 18:12:53 +01:00
|
|
|
{
|
|
|
|
source: '/redirect-4',
|
|
|
|
destination: '/',
|
|
|
|
permanent: false,
|
|
|
|
},
|
2020-10-29 18:48:54 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
async rewrites() {
|
|
|
|
return [
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/en-US/rewrite-1',
|
2020-10-29 18:48:54 +01:00
|
|
|
destination: '/another',
|
2020-11-14 04:35:42 +01:00
|
|
|
locale: false,
|
2020-10-29 18:48:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/nl/rewrite-2',
|
|
|
|
destination: '/nl/another',
|
|
|
|
locale: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/fr/rewrite-3',
|
|
|
|
destination: '/nl/another',
|
|
|
|
locale: false,
|
2020-10-29 18:48:54 +01:00
|
|
|
},
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/rewrite-4',
|
2020-10-29 18:48:54 +01:00
|
|
|
destination: '/another',
|
|
|
|
},
|
2020-11-14 04:35:42 +01:00
|
|
|
{
|
|
|
|
source: '/rewrite-5',
|
|
|
|
destination: 'http://localhost:__EXTERNAL_PORT__',
|
|
|
|
},
|
2020-10-29 18:48:54 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
async headers() {
|
|
|
|
return [
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/en-US/add-header-1',
|
|
|
|
locale: false,
|
2020-10-29 18:48:54 +01:00
|
|
|
headers: [
|
|
|
|
{
|
|
|
|
key: 'x-hello',
|
|
|
|
value: 'world',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/nl/add-header-2',
|
|
|
|
locale: false,
|
2020-10-29 18:48:54 +01:00
|
|
|
headers: [
|
|
|
|
{
|
|
|
|
key: 'x-hello',
|
|
|
|
value: 'world',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2020-11-14 04:35:42 +01:00
|
|
|
source: '/add-header-3',
|
2020-10-29 18:48:54 +01:00
|
|
|
headers: [
|
|
|
|
{
|
|
|
|
key: 'x-hello',
|
|
|
|
value: 'world',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
2020-10-07 23:11:01 +02:00
|
|
|
}
|