mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 19:06:34 +00:00
fix: drop Secure cookie flag for non-TLS dev access
This commit is contained in:
parent
cbde4037ff
commit
fe11519925
1 changed files with 2 additions and 2 deletions
|
|
@ -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`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue