chore: add HEAD endpoint for /feed

This commit is contained in:
Yufan Sheng 2024-06-20 23:05:12 +08:00
parent e997ed42c6
commit ca71f7b924
Signed by: syhily
GPG Key ID: DEB186763C308C31

View File

@ -116,3 +116,15 @@ export const GET = async () => {
})), })),
}); });
}; };
// The rss reader may prefetch by using HEAD method.
export const HEAD = async () => {
return new Response('', {
headers: {
Host: import.meta.env.SITE,
'Content-Type': 'application/xml',
Accept: '*/*',
Connection: 'keep-alive',
},
});
};