Merged
Conversation
8028221 to
3d98596
Compare
hacdias
commented
Mar 5, 2024
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #584 +/- ##
==========================================
+ Coverage 65.64% 65.66% +0.02%
==========================================
Files 207 207
Lines 25617 25656 +39
==========================================
+ Hits 16815 16848 +33
- Misses 7328 7335 +7
+ Partials 1474 1473 -1
|
2color
reviewed
Mar 5, 2024
2color
reviewed
Mar 5, 2024
2color
reviewed
Mar 5, 2024
2color
reviewed
Mar 5, 2024
2color
reviewed
Mar 5, 2024
hacdias
commented
Mar 5, 2024
Co-authored-by: Daniel Norman <[email protected]>
52243a2 to
2a18c58
Compare
While we are at adding cache-control, we should leverage stale-while-revalidate hint, especially when we have useful results. Adding Last-Modified also does not cost us anything, but allows clients to benefit from caching proxies and CDNs in front of someguy returning HTTP 304 when request includes If-Modified-Since.
IPNS records should have "string etag" following syntax from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
this ensures proxies put in front of someguy will use Accept from request in the cache key, and not mix application/x-ndjson responses with application/json ones.
lidel
approved these changes
Mar 7, 2024
Member
lidel
left a comment
There was a problem hiding this comment.
lgtm.
@hacdias i've pushed a few additional improvements which felt like low hanging fruits that will improve setups like our someguy deployment at https://delegated-ipfs.dev/routing/v1/, so would be good if you 👀 before merging.
If no concerns, feel free to merge and:
- bubble this up to someguy and delegated-ipfs
- PR against https://specs.ipfs.tech/routing/http-routing-v1/ ensure each endpoint has "response headers" documented (I think no need for IPIP, cache-control was just missing entierely)
This was referenced Mar 7, 2024
wenyue
pushed a commit
to wenyue/boxo
that referenced
this pull request
Oct 17, 2024
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.
Cache-control for ipfs/someguy#26.