diff --git a/src/app/[username]/feed/route.ts b/src/app/[username]/feed/route.ts index 822957d..39cc203 100644 --- a/src/app/[username]/feed/route.ts +++ b/src/app/[username]/feed/route.ts @@ -15,7 +15,7 @@ const GET = async (request: Request, { params }: { params: { username: string } const rssFeed = await getRssFeed(username, hostname, quality); - return new NextResponse(rssFeed); + return new NextResponse(rssFeed, { headers: { "Cache-Control": "s-maxage=300" } }); } catch (errorMessage) { return new NextResponse((errorMessage as string | undefined) ?? "Unexpected Error", { status: 500, diff --git a/src/app/videos/[videoId]/route.ts b/src/app/videos/[videoId]/route.ts index bf47a52..9e01dfd 100644 --- a/src/app/videos/[videoId]/route.ts +++ b/src/app/videos/[videoId]/route.ts @@ -13,7 +13,9 @@ const GET = async (request: Request, { params }: { params: { videoId: string } } const m3u8 = await getStream(videoId, quality); - return new NextResponse(m3u8, { headers: { "Content-Type": "application/x-mpegURL" } }); + return new NextResponse(m3u8, { + headers: { "Cache-Control": "s-maxage=600", "Content-Type": "application/x-mpegURL" }, + }); } catch (errorMessage) { return new NextResponse((errorMessage as string | undefined) ?? "Unexpected Error", { status: 500,