Skip to content

Commit

Permalink
Update cache-control headers
Browse files Browse the repository at this point in the history
  • Loading branch information
MangoSwirl committed Jun 24, 2024
1 parent d2510f5 commit ed645bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/api/people/[id]/picture/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const GET: RequestHandler = async ({ params, url }) => {
return new Response(resizedBuffer, {
headers: {
'Content-Type': 'image/png',
'Cache-Control': 'public, s-maxage=1800'
'Cache-Control': 'public, maxage=1800, s-maxage=30'
}
});
} else if (user?.image) {
Expand All @@ -56,7 +56,7 @@ export const GET: RequestHandler = async ({ params, url }) => {
return new Response(buffer, {
headers: {
'Content-Type': 'image/png',
'Cache-Control': 'public, s-maxage=1800'
'Cache-Control': 'public, maxage=1800, s-maxage=30'
}
});
} else {
Expand Down Expand Up @@ -108,7 +108,7 @@ export const GET: RequestHandler = async ({ params, url }) => {
return new Response(buffer, {
headers: {
'Content-Type': 'image/png',
'Cache-Control': 'public, s-maxage=1800'
'Cache-Control': 'public, maxage=1800, s-maxage=30'
}
});
}
Expand Down

0 comments on commit ed645bc

Please sign in to comment.