Skip to content

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

Open
vschaefer wants to merge 1 commit intointegrationfrom
i-fix-error-handling-cache
Open

fix: prevent caching of non-200 response status codes in GZip middleware#174
vschaefer wants to merge 1 commit intointegrationfrom
i-fix-error-handling-cache

Conversation

@vschaefer
Copy link
Collaborator

No description provided.

Copy link

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');

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