From 3cd92b835f5b0664ce2d4023f2a2d83239fdd6f2 Mon Sep 17 00:00:00 2001 From: Adam Hall Date: Fri, 11 Jul 2025 13:24:42 +0930 Subject: [PATCH] HOTFIX: Send cache-control headers when maint mode is enabled to ensure cloudfront never caches the response --- .../maintenance-mode-plugin/src/lib/maintenance-mode-plugin.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/maintenance-mode-plugin/src/lib/maintenance-mode-plugin.ts b/packages/maintenance-mode-plugin/src/lib/maintenance-mode-plugin.ts index e07b1ead..faf5a214 100644 --- a/packages/maintenance-mode-plugin/src/lib/maintenance-mode-plugin.ts +++ b/packages/maintenance-mode-plugin/src/lib/maintenance-mode-plugin.ts @@ -34,6 +34,9 @@ export function maintenanceModePlugin(maintenanceFilePath: string): Plugin { endResponse( new fetchAPI.Response('In Maintenance Mode', { status: 503, + headers: { + 'cache-control': 'no-cache, no-store' + } }) ); }