enable maintenance mode

This commit is contained in:
Karol Wypchlo 2021-12-14 15:28:13 +01:00
parent a124b8a9ec
commit 9018721945
No known key found for this signature in database
GPG Key ID: C92C016317A964D0
1 changed files with 15 additions and 0 deletions

View File

@ -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;
},
};