File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -552,7 +552,10 @@ export function badgeRoutes(): express.Router {
552552
553553 router . get ( '/:id' , ( req : express . Request , res : express . Response ) => {
554554 getRepositoryBadge ( req . params . id ) . then ( status => {
555- res . writeHead ( 200 , { 'Content-Type' : 'image/svg+xml' } ) ;
555+ res . writeHead ( 200 , {
556+ 'Content-Type' : 'image/svg+xml' ,
557+ 'Cache-Control' : 'no-cache'
558+ } ) ;
556559 res . write ( generateBadgeHtml ( status ) ) ;
557560 res . end ( ) ;
558561 } ) . catch ( err => res . status ( 200 ) . json ( { status : false } ) ) ;
@@ -562,7 +565,10 @@ export function badgeRoutes(): express.Router {
562565 getRepositoryId ( req . params . owner , req . params . repository )
563566 . then ( id => getRepositoryBadge ( id ) )
564567 . then ( status => {
565- res . writeHead ( 200 , { 'Content-Type' : 'image/svg+xml' } ) ;
568+ res . writeHead ( 200 , {
569+ 'Content-Type' : 'image/svg+xml' ,
570+ 'Cache-Control' : 'no-cache'
571+ } ) ;
566572 res . write ( generateBadgeHtml ( status ) ) ;
567573 res . end ( ) ;
568574 } ) . catch ( err => res . status ( 200 ) . json ( { status : false } ) ) ;
You can’t perform that action at this time.
0 commit comments