spb/datacenterindex
Public
HTML 53.9%
TypeScript 44.5%
JavaScript 0.6%
SQL 0.5%
1import { SITE_URL } from "@/lib/routes";2import { sitemapIds } from "./ids";34/** Sitemap index (robots.txt points here) listing every per-id sitemap generated by app/sitemap.ts. */5export const revalidate = 3600;67export function GET(): Response {8 const now = new Date().toISOString();9 const body = `<?xml version="1.0" encoding="UTF-8"?>10<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">11${sitemapIds()12 .map((id) => ` <sitemap><loc>${SITE_URL}/sitemap/${id}.xml</loc><lastmod>${now}</lastmod></sitemap>`)13 .join("\n")}14</sitemapindex>15`;16 return new Response(body, { headers: { "Content-Type": "application/xml; charset=utf-8", "Cache-Control": "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400" } });17}18