refactor(sitemap): enforce dynamic rendering for sitemap routes

This commit is contained in:
2025-02-13 17:50:26 +01:00
parent 864580c0ab
commit 3cdd1c4bec
2 changed files with 3 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ interface ProjectsData {
posts: Project[]; posts: Project[];
} }
export const dynamic = 'force-dynamic';
export const runtime = "nodejs"; // Force Node runtime export const runtime = "nodejs"; // Force Node runtime
const GHOST_API_URL = "http://192.168.179.31:2368"; const GHOST_API_URL = "http://192.168.179.31:2368";

View File

@@ -1,5 +1,7 @@
import {NextResponse} from "next/server"; import {NextResponse} from "next/server";
export const dynamic = 'force-dynamic';
export async function GET() { export async function GET() {
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "https://dki.one"; // 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 const apiUrl = `${baseUrl}/api/sitemap`; // Verwende die vollständige URL zur API