1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 15:16:40 -04:00

set content-type header of sitemap.xml

This commit is contained in:
2022-05-30 11:41:01 -04:00
parent 90eff3f063
commit be54bc2644

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));