Skip to content

Commit

Permalink
add HTTP_ALLOWED env var, fixes Impossible to login without HTTPS #9
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed May 28, 2024
1 parent c552748 commit a98db90
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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",
});
Expand Down Expand Up @@ -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",
});
Expand Down Expand Up @@ -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",
});
Expand Down

0 comments on commit a98db90

Please sign in to comment.