mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix(frontend): 🎨 Make the glitch-soc session cookie last a week instead of for the session
This commit is contained in:
parent
245d4844f5
commit
94f9586592
|
|
@ -63,13 +63,16 @@ export default apiRoute<typeof meta, typeof schema>(
|
|||
userId: user.id,
|
||||
});
|
||||
|
||||
// One week from now
|
||||
const maxAge = String(60 * 60 * 24 * 7);
|
||||
|
||||
// Redirect to home
|
||||
return new Response(null, {
|
||||
headers: {
|
||||
Location: "/",
|
||||
"Set-Cookie": `_session_id=${accessToken}; Domain=${
|
||||
new URL(config.http.base_url).hostname
|
||||
}; SameSite=Lax; Path=/; HttpOnly`,
|
||||
}; SameSite=Lax; Path=/; HttpOnly; Max-Age=${maxAge}`,
|
||||
},
|
||||
status: 303,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue