Skip to content

docs(nginx-caching): send range requests to the gateway uncached; turn gzip off - #189

Merged
vilenarios merged 1 commit into
mainfrom
docs/nginx-range-signatures
Oct 17, 2026
Merged

vilenarios merged 1 commit into
mainfrom
docs/nginx-range-signatures

Conversation

@vilenarios

Copy link
Copy Markdown
Contributor

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):

  • A range answered from a cached 200 reuses its signature, which was made for status 200, and its whole-item Content-Digest. The 206 fails HTTPSIG verification.
  • On a miss, NGINX drops Range and fetches the whole item first.
  • Ubuntu's gzip on compresses signed HTML.

Change:

  • $http_range in proxy_cache_bypass / proxy_no_cache, and Range/If-Range passed on explicitly in /raw/, the 43-char location and the catch-all.
  • gzip off.
  • A new section explains why.
  • The index-sharing paragraph's "only proxy_cache off works" 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:

  • Before, the edge's 206 signature is invalid; after, it is valid.
  • Full GETs still HIT, and a range does not evict.
  • check-links and lint pass.

Draft: merge with Release 85 (gateways then send Repr-Digest on 206, ar-io/ar-io-node#1040).

🤖 Generated with Claude Code

https://claude.ai/code/session_0199RxMU4gMhCR79mjzkR6qT

…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
@vilenarios
vilenarios marked this pull request as ready for review October 17, 2026 16:08
@vilenarios
vilenarios requested a review from a team as a code owner October 17, 2026 16:08
@vilenarios
vilenarios merged commit 9b949e9 into main Oct 17, 2026
@vilenarios
vilenarios deleted the docs/nginx-range-signatures branch October 17, 2026 16:08
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.

1 participant