mirror of
https://github.com/C4illin/ConvertX.git
synced 2025-11-03 13:33:25 +00:00
add HTTP_ALLOWED env var, fixes Impossible to login without HTTPS #9
This commit is contained in:
@@ -27,6 +27,8 @@ const outputDir = "./data/output/";
|
||||
const ACCOUNT_REGISTRATION =
|
||||
process.env.ACCOUNT_REGISTRATION === "true" || false;
|
||||
|
||||
const HTTP_ALLOWED = process.env.HTTP_ALLOWED === "true" || false;
|
||||
|
||||
// fileNames: fileNames,
|
||||
// filesToConvert: fileNames.length,
|
||||
// convertedFiles : 0,
|
||||
@@ -244,7 +246,7 @@ const app = new Elysia()
|
||||
auth.set({
|
||||
value: accessToken,
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
secure: !HTTP_ALLOWED,
|
||||
maxAge: 60 * 60 * 24 * 7,
|
||||
sameSite: "strict",
|
||||
});
|
||||
@@ -350,7 +352,7 @@ const app = new Elysia()
|
||||
auth.set({
|
||||
value: accessToken,
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
secure: !HTTP_ALLOWED,
|
||||
maxAge: 60 * 60 * 24 * 7,
|
||||
sameSite: "strict",
|
||||
});
|
||||
@@ -418,7 +420,7 @@ const app = new Elysia()
|
||||
jobId.set({
|
||||
value: id,
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
secure: !HTTP_ALLOWED,
|
||||
maxAge: 24 * 60 * 60,
|
||||
sameSite: "strict",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user