1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 17:48:30 -04:00

set content-type header of sitemap.xml

This commit is contained in:
Jake Jarvis 2022-05-30 11:41:01 -04:00
parent 90eff3f063
commit be54bc2644
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39

View File

@ -50,6 +50,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
// cache on edge for 12 hours
const { res } = context;
res.setHeader("cache-control", "s-maxage=43200, stale-while-revalidate=3600");
res.setHeader("content-type", "application/xml; charset=utf-8");
// finally write the resulting XML
res.write(await streamToPromise(stream));