set public next env vars from config

This commit is contained in:
Milo Schwartz 2024-10-12 21:23:12 -04:00
parent cf1de2253b
commit 61fca6a1f6
No known key found for this signature in database
7 changed files with 69 additions and 33 deletions

View file

@ -24,13 +24,9 @@ export const lucia = new Lucia(adapter, {
expires: false,
attributes: {
sameSite: "strict",
secure: config.app.secure_cookies || false,
secure: config.server.secure_cookies || false,
domain:
"." +
config.app.external_base_url
.split("://")[1]
.split(":")[0]
.split("/")[0],
"." + new URL(config.app.base_url).hostname.split(".").slice(-2).join("."),
},
},
sessionExpiresIn: new TimeSpan(2, "w"),