chore: add HEAD endpoint for /feed

This commit is contained in:
Yufan Sheng 2024-06-20 23:05:12 +08:00
parent d24dac2485
commit 179a2b088f
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B

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',
},
});
};