From efe2afb0b2842592d4eddcbc728f8fb551a0be5e Mon Sep 17 00:00:00 2001 From: Denshooter Date: Thu, 13 Feb 2025 17:33:57 +0100 Subject: [PATCH] fix(sitemap): update base URL to production for sitemap generation --- app/api/sitemap/route.tsx | 2 +- app/sitemap.xml/route.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/sitemap/route.tsx b/app/api/sitemap/route.tsx index d49062e..58e1164 100644 --- a/app/api/sitemap/route.tsx +++ b/app/api/sitemap/route.tsx @@ -36,7 +36,7 @@ function generateXml(sitemapRoutes: { url: string; lastModified: string }[]) { } export async function GET() { - const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"; + const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "https://dki.one"; // Statische Routen const staticRoutes = [ diff --git a/app/sitemap.xml/route.tsx b/app/sitemap.xml/route.tsx index b302bab..b69b080 100644 --- a/app/sitemap.xml/route.tsx +++ b/app/sitemap.xml/route.tsx @@ -1,7 +1,7 @@ import {NextResponse} from "next/server"; export async function GET() { - const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"; // Stelle sicher, dass die Base-URL korrekt ist + const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "https://dki.one"; // Stelle sicher, dass die Base-URL korrekt ist const apiUrl = `${baseUrl}/api/sitemap`; // Verwende die vollständige URL zur API try {