From bef1710e3376baa7e25c107ded20a40d18b8c6b0 Mon Sep 17 00:00:00 2001 From: C4illin Date: Thu, 12 Sep 2024 12:58:28 +0200 Subject: [PATCH] fix: allow non lowercase true and false values, fixes #122 --- src/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index a48c854..a69d85d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -27,11 +27,12 @@ const uploadsDir = "./data/uploads/"; const outputDir = "./data/output/"; const ACCOUNT_REGISTRATION = - process.env.ACCOUNT_REGISTRATION === "true" || false; + process.env.ACCOUNT_REGISTRATION?.toLowerCase() === "true" || false; -const HTTP_ALLOWED = process.env.HTTP_ALLOWED === "true" || false; +const HTTP_ALLOWED = + process.env.HTTP_ALLOWED?.toLowerCase() === "true" || false; const ALLOW_UNAUTHENTICATED = - process.env.ALLOW_UNAUTHENTICATED === "true" || false; + process.env.ALLOW_UNAUTHENTICATED?.toLowerCase() === "true" || false; // fileNames: fileNames, // filesToConvert: fileNames.length,