Merge pull request #1458 from SkynetLabs/enable-accounts-maintenance

add accounts maintenance mode redirect
This commit is contained in:
Karol Wypchło 2021-12-15 11:27:27 +01:00 committed by GitHub
commit a71f79f91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
},
};