Skip to content

fix: prevent caching of non-200 response status codes in GZip middleware#174

Merged
vschaefer merged 2 commits into
integrationfrom
i-fix-error-handling-cache
Apr 27, 2026
Merged

fix: prevent caching of non-200 response status codes in GZip middleware#174
vschaefer merged 2 commits into
integrationfrom
i-fix-error-handling-cache

Conversation

@vschaefer
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prevents caching of responses with non-200 status codes in the GZip middleware.

  • Added a check on the response status code before caching
  • Added a log statement when the response is not cached due to its status code
Comments suppressed due to low confidence (1)

src/server/middlewares/cacheGZipMiddleware.js:47

  • [nitpick] Consider replacing console.log with a dedicated logging mechanism suitable for production environments to ensure proper log management.
console.log('Response status code is not 200, not caching');

@vschaefer vschaefer merged commit 24b9034 into integration Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants