Skip to content

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

15 linesCodeBlameRaw
1/**
2 * /robots.txt (lib/robots.ts). Served from the request's own origin, so a
3 * self-hosted g1t names itself.
4 */
5import type { Route } from "./+types/robots-txt";
6import { robotsTxt } from "../lib/robots";
7
8export function loader({ request }: Route.LoaderArgs) {
9 return new Response(robotsTxt(new URL(request.url).origin), {
10 headers: {
11 "content-type": "text/plain; charset=utf-8",
12 "cache-control": "public, max-age=86400",
13 },
14 });
15}