feat: pass through cache-related headers and support conditional requ…#14
Open
cpilsworth wants to merge 2 commits into
Open
feat: pass through cache-related headers and support conditional requ…#14cpilsworth wants to merge 2 commits into
cpilsworth wants to merge 2 commits into
Conversation
…ests - Forward If-Modified-Since from client to origin and return 304 responses - Pass Date, Last-Modified, and Cache-Control from origin to client - Refactor header selection into shared pickHeaders() utility - Add test coverage for header pass-through behaviour Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mhaack
reviewed
Apr 29, 2026
Comment on lines
+23
to
+24
| const PASSTHROUGH_HEADERS = ['Date', 'Last-Modified', 'Cache-Control']; | ||
| const ORIGIN_REQUEST_HEADERS = ['If-Modified-Since']; |
Contributor
There was a problem hiding this comment.
Lets move these to the top before the first function
mhaack
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for cache control and validation, fixing #13
If-Modified-Sincefrom client to origin and return304responsesDate,Last-Modified, andCache-Controlfrom origin to client