mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Add SameSite=None
This commit is contained in:
@@ -95,7 +95,7 @@ export async function handler(req: Request, ctx: FreshContext) {
|
|||||||
"Set-Cookie",
|
"Set-Cookie",
|
||||||
`token=${t.token}; Expires=${t.expired.toUTCString()}${
|
`token=${t.token}; Expires=${t.expired.toUTCString()}${
|
||||||
t.http_only ? "; HttpOnly" : ""
|
t.http_only ? "; HttpOnly" : ""
|
||||||
}${t.secure ? "; Secure" : ""}; Path=/api`,
|
}${t.secure ? "; SameSite=None; Secure" : ""}; Path=/api`,
|
||||||
);
|
);
|
||||||
} catch {
|
} catch {
|
||||||
null;
|
null;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export const handler: Handlers = {
|
|||||||
if (is_from_auth && is_from_cookie) {
|
if (is_from_auth && is_from_cookie) {
|
||||||
headers["Set-Cookie"] = `token=${token.token}; Max-Age=0${
|
headers["Set-Cookie"] = `token=${token.token}; Max-Age=0${
|
||||||
token.http_only ? "; HttpOnly" : ""
|
token.http_only ? "; HttpOnly" : ""
|
||||||
}${token.secure ? "; Secure" : ""}; Path=/api`;
|
}${token.secure ? "; SameSite=None; Secure" : ""}; Path=/api`;
|
||||||
}
|
}
|
||||||
return return_data(true, 200, headers);
|
return return_data(true, 200, headers);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user