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