mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-06 05:38:44 +08:00
Fix Cookie's Path may not correct
This commit is contained in:
@@ -70,7 +70,7 @@ export async function handler(req: Request, ctx: MiddlewareHandlerContext) {
|
||||
"Set-Cookie",
|
||||
`token=${t.token}; Expires=${t.expired.toUTCString()}${
|
||||
t.http_only ? "; HttpOnly" : ""
|
||||
}${t.secure ? "; Secure" : ""}`,
|
||||
}${t.secure ? "; Secure" : ""}; Path=/api`,
|
||||
);
|
||||
} catch {
|
||||
null;
|
||||
|
||||
@@ -75,7 +75,7 @@ export const handler: Handlers = {
|
||||
headers["Set-Cookie"] =
|
||||
`token=${token.token}; Expires=${token.expired.toUTCString()}${
|
||||
http_only ? "; HttpOnly" : ""
|
||||
}${secure ? "; Secure" : ""}`;
|
||||
}${secure ? "; Secure" : ""}; Path=/api`;
|
||||
}
|
||||
return return_data(token, 201, headers);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user