import { ampless } from '@/lib/ampless' interface Ctx { request: Request } export async function docsFeedHandler(_ctx: Ctx): Promise { const url = ampless.publicAssetUrl('public/plugins/rss/feed.xml') const upstream = await fetch(url, { cache: 'no-store' }) if (!upstream.ok) { return new Response( `\n\n`, { status: 200, headers: { 'Content-Type': 'application/rss+xml; charset=utf-8', 'Cache-Control': 'public, max-age=60', }, } ) } return new Response(upstream.body, { headers: { 'Content-Type': 'application/rss+xml; charset=utf-8', 'Cache-Control': 'public, max-age=300', }, }) }