17 lines
366 B
TypeScript
17 lines
366 B
TypeScript
import { define, unsetAuthCookie } from "../utils.ts";
|
|
|
|
export const handler = define.handlers({
|
|
GET(ctx) {
|
|
const headers = new Headers();
|
|
unsetAuthCookie(headers);
|
|
|
|
const url = new URL(ctx.req.url);
|
|
url.pathname = "/";
|
|
headers.set("location", url.toString());
|
|
return new Response(null, {
|
|
status: 303,
|
|
headers,
|
|
});
|
|
},
|
|
});
|