Add SameSite=None

This commit is contained in:
2024-05-26 09:35:06 +08:00
parent df04cfa93e
commit 316492e933
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ export async function handler(req: Request, ctx: FreshContext) {
"Set-Cookie",
`token=${t.token}; Expires=${t.expired.toUTCString()}${
t.http_only ? "; HttpOnly" : ""
}${t.secure ? "; Secure" : ""}; Path=/api`,
}${t.secure ? "; SameSite=None; Secure" : ""}; Path=/api`,
);
} catch {
null;