Skip to content

Commit

Permalink
Add cache to feed responses
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsharp committed Jun 17, 2024
1 parent b949c8f commit 050424a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/[feedId]/feed/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const GET = async (request: Request, { params }: { params: { feedId: string } })
const moddedFeedData = applyMods(feedData, modConfig);
const feed = buildFeed(moddedFeedData, feedId, host);

return new NextResponse(feed);
return new NextResponse(feed, { headers: { "Cache-Control": "max-age=900" } });
} catch (errorMessage) {
console.error(errorMessage);
return new NextResponse((errorMessage as string | undefined) ?? "Unexpected Error", {
Expand Down

0 comments on commit 050424a

Please sign in to comment.