From 10d943854143dff66810793f965d3b0992c569dd Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Tue, 16 Apr 2024 01:19:51 +0800 Subject: [PATCH] refactor: remove cache for monitor badge --- src/server/router/monitor.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/router/monitor.ts b/src/server/router/monitor.ts index 28d4520..35799fa 100644 --- a/src/server/router/monitor.ts +++ b/src/server/router/monitor.ts @@ -34,6 +34,13 @@ monitorRouter.get( color: 'red', }); - res.header('Content-Type', 'image/svg+xml').send(svg); + res + .header('Content-Type', 'image/svg+xml') + .header( + 'Cache-Control', + 'no-cache,max-age=0,no-store,s-maxage=0,proxy-revalidate' + ) + .status(200) + .send(svg); } );