import { NextResponse } from "next/server";
import { getPosts } from "@/lib/posts";
const SITE_URL = "https://denizbektas.com.tr";
export async function GET() {
const posts = getPosts("infosec");
const items = posts
.map(
(post) => `
-
${SITE_URL}/infosec/${post.slug}
${SITE_URL}/infosec/${post.slug}
${new Date(post.date).toUTCString()}
`
)
.join("\n");
const xml = `
Deniz Bektaş — Infosec Posts
${SITE_URL}/infosec
Teknik siber güvenlik yazıları
tr
${new Date().toUTCString()}
${items}
`;
return new NextResponse(xml, {
headers: { "Content-Type": "application/xml; charset=utf-8", "Cache-Control": "public, max-age=3600" },
});
}