Repository navigation
docs(nginx-caching): send range requests to the gateway uncached; turn gzip off - #189
Merged
Merged
Conversation
…n gzip off A range answered from a cached 200 reuses its signature (made for status 200) and its whole-item Content-Digest, so the 206 fails verification; on a miss NGINX also drops Range and fetches the whole item. Ubuntu's gzip on compresses signed HTML. Bypass and skip storing requests with a Range header, pass Range and If-Range on explicitly in the cached data and catch-all locations, and set gzip off. Verified with an nginx 1.18 copy of a production config: the edge's 206 signature fails before and verifies after; full GETs still cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0199RxMU4gMhCR79mjzkR6qT
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.
Found while answering whether a browser can read an SQLite file from a gateway by range requests.
Problem (measured on a production edge that follows this article):
200reuses its signature, which was made for status200, and its whole-itemContent-Digest. The206fails HTTPSIG verification.Rangeand fetches the whole item first.gzip oncompresses signed HTML.Change:
$http_rangeinproxy_cache_bypass/proxy_no_cache, andRange/If-Rangepassed on explicitly in/raw/, the 43-char location and the catch-all.gzip off.proxy_cache offworks" is corrected: a request-keyed bypass also works.Verified with an nginx 1.18 copy of the production config and an RFC 9421 verifier against the gateway's key:
206signature is invalid; after, it is valid.check-linksandlintpass.Draft: merge with Release 85 (gateways then send
Repr-Digeston206, ar-io/ar-io-node#1040).🤖 Generated with Claude Code
https://claude.ai/code/session_0199RxMU4gMhCR79mjzkR6qT