From 3708990d17d4d4523dbb168ccd8c1727582835cd Mon Sep 17 00:00:00 2001 From: flakey5 <73616808+flakey5@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:27:25 -0700 Subject: [PATCH] src: don't add cache headers Investigating why staging always falls back to the origin for directory listings after #125, this will _hopefully_ fix things Sentry ref: https://nodejs-org.sentry.io/issues/5799625624/ Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com> --- src/middleware/cacheMiddleware.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/middleware/cacheMiddleware.ts b/src/middleware/cacheMiddleware.ts index 68dbe05..374baa2 100644 --- a/src/middleware/cacheMiddleware.ts +++ b/src/middleware/cacheMiddleware.ts @@ -50,13 +50,10 @@ export function cached(middleware: Middleware): Middleware { if (!wasDeferred && response.status === 200) { // Successful request, let's cache it for next time const cachedResponse = response.clone(); - cachedResponse.headers.append('x-cache-status', 'hit'); ctx.execution.waitUntil(cache.put(request, cachedResponse)); } - response.headers.append('x-cache-status', 'miss'); - return response; }, };