diff --git a/src/app/imaging/route.ts b/src/app/imaging/route.ts index b6b31727..01c0ddc9 100644 --- a/src/app/imaging/route.ts +++ b/src/app/imaging/route.ts @@ -90,7 +90,10 @@ export async function GET(request: NextRequest) { status: 200, headers: { "Content-Type": contentType, - "Cache-Control": "public, max-age=3600", + // s-maxage lets Cloudflare/edge cache avatars (currently DYNAMIC), + // stale-while-revalidate keeps them fresh without blocking requests. + "Cache-Control": + "public, max-age=3600, s-maxage=86400, stale-while-revalidate=86400", "Access-Control-Allow-Origin": "*", }, });