Skip to content

Remove ETag middleware to disable ETag for all requests#8069

Merged
aduth merged 1 commit intomainfrom
aduth-rm-etag-middleware
Mar 24, 2023
Merged

Remove ETag middleware to disable ETag for all requests#8069
aduth merged 1 commit intomainfrom
aduth-rm-etag-middleware

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Mar 24, 2023

🛠 Summary of changes

Removes the default Rack ETag middleware to avoid generating an ETag response header.

Benefits:

  • Improve performance by avoiding creating a body digest for each request
  • Shrink size of response
  • Consistent with expectation that all routes are not to be cached (source)
  • Avoid ad-hoc usage (example)

📜 Testing Plan

  1. curl -I http://localhost:3000
  2. Observe there is no ETag response header

changelog: Internal, Performance, Avoid generating header for digested contents related to disabled cache
@aduth aduth merged commit 52e8769 into main Mar 24, 2023
@aduth aduth deleted the aduth-rm-etag-middleware branch March 24, 2023 16:53
@aduth aduth mentioned this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants