Merge pull request #8 from Rowblox/sitetest

Actually fix env vars this time
This commit is contained in:
I-Have-An-Issue 2022-10-08 03:46:31 +00:00 committed by GitHub
commit 5cad3ea0cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
if (event.url.pathname !== "/maintenance" && process.env.MAINTENANCE == "true" && process.env.PRODUCTION == "true") {
if (event.url.pathname !== "/maintenance" && process.env.MAINTENANCE) {
return new Response("", { status: 302, headers: { Location: "/maintenance" } });
}