Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove old cookie from client if provided
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 15c4257 commit f6b57f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions functions/_middleware.ts
Expand Up @@ -41,6 +41,11 @@ async function setAuth(context: RequestContext) {
);

if (userData) context.data.current_user = JSON.parse(userData);
else
context.request.headers.append(
"set-cookie",
"_s=; HttpOnly; Max-Age=0; Path=/; Secure;"
);

break;
}
Expand Down

0 comments on commit f6b57f2

Please sign in to comment.