REMEMBER US FOR A YEAR!
This commit is contained in:
parent
c6977cd760
commit
f20e280b19
|
|
@ -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,
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user