g1t/apps/web/app/routes/security-txt.ts

16 lines517 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.

Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look1/**
2 * /.well-known/security.txt (RFC 9116): where to report a vulnerability.
3 * Its `Expires` is computed, so it never goes stale.
4 */
5import type { Route } from "./+types/security-txt";
6import { securityTxt } from "../lib/legal";
7
8export function loader({ request }: Route.LoaderArgs) {
9 const site = new URL(request.url).origin;
10 return new Response(securityTxt(new Date(), site), {
11 headers: {
12 "content-type": "text/plain; charset=utf-8",
13 "cache-control": "public, max-age=86400",
14 },
15 });
16}