From c4bede20d414b5a113d19dfb60444f09a16182c2 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Fri, 26 Jun 2026 22:12:37 +0800 Subject: [PATCH] fix: remove duplicate sitemap route - app/sitemap.ts already generates the sitemap index via generateSitemaps() - app/sitemap.xml/route.ts was a duplicate manual version at the same path --- app/sitemap.xml/route.ts | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 app/sitemap.xml/route.ts diff --git a/app/sitemap.xml/route.ts b/app/sitemap.xml/route.ts deleted file mode 100644 index 262ef86..0000000 --- a/app/sitemap.xml/route.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { generateSitemaps } from "@/app/sitemap" -import { getBaseUrl } from "@/lib/sitemap-utils" - -export const revalidate = 3600 - -export async function GET() { - const baseUrl = getBaseUrl() - const sitemaps = await generateSitemaps() - - const entries = sitemaps - .map(({ id }) => ` \n ${baseUrl}/sitemap/${id}.xml\n `) - .join("\n") - - const xml = [ - ``, - ``, - entries, - ``, - ].join("\n") - - return new Response(xml, { - headers: { - "Content-Type": "application/xml", - "Cache-Control": "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400", - }, - }) -} \ No newline at end of file