mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
refactor(frontend): 🎨 Change glitch-soc cookie name to _session_id
This commit is contained in:
parent
866cd4345d
commit
8fc725639c
|
|
@ -13,7 +13,7 @@ export const handleGlitchRequest = async (
|
|||
let path = url.pathname;
|
||||
const accessToken = req.headers
|
||||
.get("Cookie")
|
||||
?.match(/_mastodon_session=(.*?)(;|$)/)?.[1];
|
||||
?.match(/_session_id=(.*?)(;|$)/)?.[1];
|
||||
const user = await retrieveUserFromToken(accessToken ?? "");
|
||||
|
||||
// Strip leading /web from path
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export default apiRoute<typeof meta, typeof schema>(
|
|||
return new Response(null, {
|
||||
headers: {
|
||||
Location: "/",
|
||||
"Set-Cookie": `_mastodon_session=${accessToken}; Domain=${
|
||||
"Set-Cookie": `_session_id=${accessToken}; Domain=${
|
||||
new URL(config.http.base_url).hostname
|
||||
}; SameSite=Lax; Path=/; HttpOnly`,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue