fix(gateway): clarify cache-control of generated html on /ipfs and TTL on /ipns#480
Open
lidel wants to merge 6 commits into
Open
fix(gateway): clarify cache-control of generated html on /ipfs and TTL on /ipns#480lidel wants to merge 6 commits into
lidel wants to merge 6 commits into
Conversation
a9ab757 to
d3cdb71
Compare
4 tasks
lidel
commented
Nov 21, 2024
Bonvi28
approved these changes
May 23, 2026
A fixed stale-while-revalidate window let caches reuse an IPNS record past its Validity (EOL). After EOL the signature is expired, so validating clients reject the record, which surfaced as sporadic 500s in the service-worker gateway. Mirror the bound applied in ipfs/boxo#1166: max-age plus the stale window must end before the EOL, and an already-expired record must not be cached. - path-gateway: keep a fixed stale window for generated /ipfs/ HTML (content-addressed, no EOL), but cap the mutable /ipns/ window to the record's remaining validity; no-store past EOL - http-routing-v1: size the ipns record stale window as remaining validity minus max-age so it ends at the EOL; no-store when the record is expired or its ValidityType is unrecognized
🚀 Build Preview on IPFS ready
|
A directory listing reached through /ipns/ is a mutable response even though its body is generated markup. State that it follows the /ipns/ TTL and EOL rules, not the fixed window used for generated /ipfs/ responses, so a cache cannot serve it past the record's EOL.
Member
Author
|
Pushed a couple more commits. Working through ipfs/boxo#1166 made the nuance here clearer: a fixed So the Same fix applied to |
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.
This PR clarifies and recommends
Cache-Controlvalue to be returned on generated HTML responses such as UnixFS Directory listings, raised by @acejam in ipfs/boxo#639 & ipfs/gateway-conformance#219.No IPIP since this is a gap is specs surface, not a change to existing spec.