diff --git a/packages/dashboard/next.config.js b/packages/dashboard/next.config.js new file mode 100644 index 00000000..6075977c --- /dev/null +++ b/packages/dashboard/next.config.js @@ -0,0 +1,15 @@ +module.exports = { + async redirects() { + const redirects = []; + + if (process.env.ACCOUNTS_MAINTENANCE === "true") { + redirects.push({ + source: "/((?!maintenance$).*)", + destination: "/maintenance", + permanent: false, + }); + } + + return redirects; + }, +};