Skip to the content

Capsid menu

app/routes/admin.logout.tsx

15 lines and 2 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.

Functions

The functions of admin.logout.tsx
FunctionLinesComplexityCoveredCRAPMutation
action9 to 141No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code
loader16 to 181No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code

Imports

It imports no other module of this repo. No module of this repo imports it.

Source

import { redirect } from "react-router";

/**
 * Signing out of Access is its own endpoint on this host: it clears the Access cookie, which no code
 * here can do. Nothing else holds a session, so this only sends the browser there.
 */
export const ACCESS_LOGOUT_PATH = "/cdn-cgi/access/logout";

export async function action() {
  return new Response(null, {
    status: 303,
    headers: { Location: ACCESS_LOGOUT_PATH, "Cache-Control": "no-store" },
  });
}

export async function loader() {
  throw redirect("/admin");
}