From 754f2964759de4b0ef351ee36f5b833b0636bce6 Mon Sep 17 00:00:00 2001 From: Faris Demirovic <63470556+farisd16@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:07:54 +0100 Subject: [PATCH] Invalidate GitHub cache so that embeddings are not cached (#123) --- packages/server/src/main/resources/diagram-resource.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/server/src/main/resources/diagram-resource.ts b/packages/server/src/main/resources/diagram-resource.ts index 642cbd01..d8fcfb8e 100644 --- a/packages/server/src/main/resources/diagram-resource.ts +++ b/packages/server/src/main/resources/diagram-resource.ts @@ -28,7 +28,12 @@ export class DiagramResource { '', ); - res.setHeader('Content-Type', 'image/svg+xml'); + res.set({ + 'Content-Type': 'image/svg+xml', + 'Cache-Control': 'no-cache', + Expires: new Date(Date.now() - 36000 * 1000).toUTCString(), + }); + return res.send(diagramSvgWhiteBackground); }