diff --git a/routes/api/_middleware.ts b/routes/api/_middleware.ts index 0f2b31b..18136ca 100644 --- a/routes/api/_middleware.ts +++ b/routes/api/_middleware.ts @@ -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; diff --git a/routes/api/token.ts b/routes/api/token.ts index 5b10b11..35c41da 100644 --- a/routes/api/token.ts +++ b/routes/api/token.ts @@ -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); },