74 lines
1.8 KiB
JavaScript
74 lines
1.8 KiB
JavaScript
const withImages = require('next-images');
|
|
const withFonts = require('next-fonts');
|
|
const withLess = require("next-with-less");
|
|
const { withSentryConfig } = require("@sentry/nextjs");
|
|
|
|
console.log({ "ORIGINS": JSON.parse(process.env.ORIGINS) });
|
|
|
|
module.exports = withSentryConfig(withImages(withFonts(withLess({
|
|
images: {
|
|
domains: JSON.parse(process.env.ORIGINS),
|
|
},
|
|
reactStrictMode: false,
|
|
async redirects()
|
|
{
|
|
return [
|
|
process.env.MAINTENANCE_MODE === "1" ? { source: "/((?!maintenance|!?assets).*)", destination: "/maintenance", permanent: false } : { source: "/maintenance", destination: "/login", permanent: false },
|
|
{
|
|
source: '/support',
|
|
destination: '/support/faq',
|
|
permanent: false,
|
|
},
|
|
]
|
|
},
|
|
async rewrites()
|
|
{
|
|
return {
|
|
afterFiles: [
|
|
{
|
|
source: "/contract/:number/payments",
|
|
destination: "/contract",
|
|
},
|
|
{
|
|
source: "/contract/:number/agreement",
|
|
destination: "/contract/agreement",
|
|
},
|
|
{
|
|
source: "/contract/:number/services",
|
|
destination: "/contract/services",
|
|
},
|
|
{
|
|
source: "/contract/:number/documents",
|
|
destination: "/contract/documents",
|
|
},
|
|
{
|
|
source: "/contract/:number/penalties",
|
|
destination: "/contract/penalties",
|
|
},
|
|
{
|
|
source: "/contract/:number/materials",
|
|
destination: "/contract/materials",
|
|
},
|
|
{
|
|
source: "/contract/:number/events",
|
|
destination: "/contract/events",
|
|
},
|
|
{
|
|
source: "/contract/:number/fines",
|
|
destination: "/contract/fines",
|
|
},
|
|
{
|
|
source: "/contract/:number/change",
|
|
destination: "/contract/change",
|
|
},
|
|
{
|
|
source: "/support/faq",
|
|
destination: "/support",
|
|
},
|
|
],
|
|
}
|
|
},
|
|
sentry: {
|
|
hideSourceMaps: true,
|
|
},
|
|
})))); |