flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/apps/web/app/routes/logout.tsx

15 lines393 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Initial g1t: services, event bus, intents and attempts1import { redirect } from "react-router";
2
3import type { Route } from "./+types/logout";
4import { assertSameOrigin, endSession } from "../lib/session.server";
5
6export async function action({ request }: Route.ActionArgs) {
7 assertSameOrigin(request);
8 throw redirect("/", {
9 headers: { "set-cookie": await endSession(request) },
10 });
11}
12
13export function loader() {
14 throw redirect("/");
15}