REMEMBER US FOR A YEAR!

This commit is contained in:
Corey Johnson 2025-08-13 09:39:31 -07:00
parent c6977cd760
commit f20e280b19

View File

@ -16,12 +16,13 @@ export const requireAuth = (handler: (req: Request) => Response | Promise<Respon
const url = new URL(req.url)
const cookieDomain = `.${url.hostname.split(".").slice(-2).join(".")}`
const oneYearInSeconds = 60 * 60 * 24 * 365
const authCookie = new Bun.Cookie({
name: "auth",
value: "authenticated",
domain: cookieDomain,
path: "/",
maxAge: 86400,
maxAge: oneYearInSeconds,
httpOnly: true,
})