fix: drop Secure cookie flag for non-TLS dev access

This commit is contained in:
Mitchell R 2026-05-10 02:57:31 +02:00
parent cbde4037ff
commit fe11519925
No known key found for this signature in database

View file

@ -25,7 +25,7 @@ export function redirectWithCookie(
if (cookie) {
headers.set(
"set-cookie",
`${cookie.name}=${cookie.value}; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=${cookie.maxAge}`,
`${cookie.name}=${cookie.value}; Path=/; HttpOnly; SameSite=Lax; Max-Age=${cookie.maxAge}`,
);
}
return new Response(null, { status, headers });
@ -37,7 +37,7 @@ export function redirectClearCookie(location: string, cookieName: string): Respo
status: 302,
headers: {
location,
"set-cookie": `${cookieName}=; Path=/; HttpOnly; Secure; SameSite=Lax; Max-Age=0`,
"set-cookie": `${cookieName}=; Path=/; HttpOnly; SameSite=Lax; Max-Age=0`,
},
});
}