File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
src/routes/[username]/[slug]/og Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -192,19 +192,15 @@ export const GET: RequestHandler = async ({ params, platform }) => {
192192 return new Response ( pngBuffer , {
193193 headers : {
194194 'Content-Type' : 'image/png' ,
195- 'Cache-Control' : 'public, max-age=60' ,
196- 'X-Font-Count' : String ( fontBuffers . length ) ,
197- 'X-Font-Size' : String ( fontBuffers [ 0 ] ?. length || 0 ) ,
198- 'X-Svg-Length' : String ( svg . length )
195+ 'Cache-Control' : 'public, max-age=3600, s-maxage=3600'
199196 }
200197 } ) ;
201- } catch ( e ) {
202- return new Response (
203- JSON . stringify ( { error : String ( e ) , stack : ( e as Error ) . stack } ) ,
204- {
205- status : 500 ,
206- headers : { 'Content-Type' : 'application/json' }
198+ } catch {
199+ return new Response ( svg , {
200+ headers : {
201+ 'Content-Type' : 'image/svg+xml' ,
202+ 'Cache-Control' : 'public, max-age=3600, s-maxage=3600'
207203 }
208- ) ;
204+ } ) ;
209205 }
210206} ;
You can’t perform that action at this time.
0 commit comments