Skip to content

Commit 9d0ce3f

Browse files
add cache control header
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 6693382 commit 9d0ce3f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/routes/og/+server.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ export const GET: RequestHandler = async ({ url }) => {
6969
bodyData = new Uint8Array(png);
7070
}
7171

72-
return new Response(bodyData, {
73-
headers: {
74-
"Content-Type": "image/png"
75-
}
76-
});
72+
return new Response(bodyData, {
73+
headers: {
74+
"Content-Type": "image/png",
75+
"Cache-Control": "public, max-age=31536000, immutable"
76+
}
77+
});
7778
};

0 commit comments

Comments
 (0)