2023-02-13 13:46:56 +00:00
|
|
|
module.exports = {
|
2024-06-05 08:52:41 +02:00
|
|
|
transpilePackages: ["@link-stack/leafcutter-ui", "@link-stack/opensearch-common"],
|
2024-09-27 14:52:44 +02:00
|
|
|
poweredByHeader: false,
|
2023-08-25 07:11:33 +00:00
|
|
|
rewrites: async () => ({
|
|
|
|
|
fallback: [
|
|
|
|
|
{
|
|
|
|
|
source: "/:path*",
|
|
|
|
|
destination: "/api/proxy/:path*",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
/*
|
2023-05-30 09:05:40 +00:00
|
|
|
basePath: "/proxy/leafcutter",
|
|
|
|
|
assetPrefix: "/proxy/leafcutter",
|
2023-02-13 13:46:56 +00:00
|
|
|
i18n: {
|
|
|
|
|
locales: ["en", "fr"],
|
|
|
|
|
defaultLocale: "en",
|
|
|
|
|
},
|
2023-06-28 09:09:45 +00:00
|
|
|
*/
|
2023-08-25 07:11:33 +00:00
|
|
|
|
|
|
|
|
/*
|
2023-06-28 09:09:45 +00:00
|
|
|
async headers() {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
source: '/:path*',
|
|
|
|
|
headers: [
|
2023-08-25 07:11:33 +00:00
|
|
|
|
2023-06-28 09:09:45 +00:00
|
|
|
{
|
|
|
|
|
key: 'Content-Security-Policy',
|
|
|
|
|
value: ContentSecurityPolicy.replace(/\s{2,}/g, ' ').trim()
|
|
|
|
|
},
|
2023-08-25 07:11:33 +00:00
|
|
|
|
2023-06-28 09:09:45 +00:00
|
|
|
{
|
|
|
|
|
key: 'Strict-Transport-Security',
|
|
|
|
|
value: 'max-age=63072000; includeSubDomains; preload'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'X-XSS-Protection',
|
|
|
|
|
value: '1; mode=block'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 'X-Frame-Options',
|
|
|
|
|
value: 'SAMEORIGIN'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}
|
2023-08-25 07:11:33 +00:00
|
|
|
*/
|
2023-02-13 13:46:56 +00:00
|
|
|
};
|