diff --git a/src/routes/atom.ts b/src/routes/atom.ts index c05bea5..22479e2 100644 --- a/src/routes/atom.ts +++ b/src/routes/atom.ts @@ -51,11 +51,17 @@ export async function handle(c: Context): Promise { const baseUrl = `https://${env.DOMAIN}`; const atomXml = generateAtomFeed(feedConfig, emailsData, baseUrl, feedId); + const linkHeader = [ + `; rel="hub"`, + `; rel="self"`, + ].join(", "); + return new Response(atomXml, { status: 200, headers: { "Content-Type": "application/atom+xml", "Cache-Control": "max-age=1800", + Link: linkHeader, }, }); } catch (error) { diff --git a/src/routes/rss.ts b/src/routes/rss.ts index 1e6a23d..88e1da3 100644 --- a/src/routes/rss.ts +++ b/src/routes/rss.ts @@ -65,11 +65,17 @@ export async function handle(c: Context): Promise { const rssXml = generateRssFeed(feedConfig, emailsData, baseUrl, feedId); // Return the RSS feed with appropriate content type + const linkHeader = [ + `; rel="hub"`, + `; rel="self"`, + ].join(", "); + return new Response(rssXml, { status: 200, headers: { "Content-Type": "application/rss+xml", "Cache-Control": "max-age=1800", // 30 minutes cache + Link: linkHeader, }, }); } catch (error) {