Skip to content

Commit

Permalink
src: don't add cache headers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
flakey5 committed Sep 5, 2024
1 parent fc7b79b commit 3708990
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/middleware/cacheMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
};
Expand Down

0 comments on commit 3708990

Please sign in to comment.