Merged in fix/sitemap-fixes (pull request #2280)

fix:sitemap - added null check and correct content-type

* fix:sitemap - added null check and correct content-type

* Revert test code


Approved-by: Erik Tiekstra
This commit is contained in:
Linus Flood
2025-06-03 14:48:24 +00:00
parent dd4ef527df
commit 68763ee1fd
3 changed files with 18 additions and 6 deletions

View File

@@ -49,6 +49,6 @@ export async function GET(
const sitemapXML = `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">${entries.join("")}\n</urlset>`
return new Response(sitemapXML, {
headers: { "Content-Type": "text/xml" },
headers: { "Content-Type": "application/xml" },
})
}