aboutsummaryrefslogtreecommitdiff
path: root/src/pages/logout.ts
blob: 1fc6b2d40a6f3d6bf6b665a8207ea7357bdef695 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import { deleteCookie, Status } from "../../deps_server.ts";

export default (req: Request): Response => {
	const headers = new Headers();
	headers.set("Location", req.headers.get("referer") || "/");
	deleteCookie(headers, "access_token");
	return new Response(null, {
		headers,
		status: Status.TemporaryRedirect,
	});
};