File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11import { render } from "svelte/server" ;
2+ import { dev } from "$app/environment" ;
23import { read } from "$app/server" ;
34import DMSerifDisplay from "@fontsource/dm-serif-display/files/dm-serif-display-latin-400-normal.woff" ;
45import Pretendard from "@fontsource/pretendard/files/pretendard-latin-400-normal.woff" ;
@@ -69,10 +70,11 @@ export const GET: RequestHandler = async ({ url }) => {
6970 bodyData = new Uint8Array ( png ) ;
7071 }
7172
72- return new Response ( bodyData , {
73+ const response = new Response ( bodyData , {
7374 headers : {
74- "Content-Type" : "image/png" ,
75- "Cache-Control" : "public, max-age=31536000, immutable"
75+ "Content-Type" : "image/png"
7676 }
7777 } ) ;
78+ if ( dev ) response . headers . append ( "Cache-Control" , "public, max-age=31536000, immutable" ) ;
79+ return response ;
7880} ;
You can’t perform that action at this time.
0 commit comments