mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-18 03:37:28 +08:00
feat: vercel cdn cache
This commit is contained in:
@@ -43,7 +43,9 @@ export async function GET(request: Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 设置缓存头(可选)
|
// 设置缓存头(可选)
|
||||||
headers.set('Cache-Control', 'public, max-age=15720000'); // 缓存半年
|
headers.set('Cache-Control', 'public, max-age=15720000, s-maxage=15720000'); // 缓存半年
|
||||||
|
headers.set('CDN-Cache-Control', 'public, s-maxage=15720000');
|
||||||
|
headers.set('Vercel-CDN-Cache-Control', 'public, s-maxage=15720000');
|
||||||
|
|
||||||
// 直接返回图片流
|
// 直接返回图片流
|
||||||
return new Response(imageResponse.body, {
|
return new Response(imageResponse.body, {
|
||||||
|
|||||||
Reference in New Issue
Block a user