-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dnslink-gw): breadcrumbs and CID column when dir listing #7699
Conversation
4ea34d8
to
cd1feb3
Compare
This switches go-ipfs to dir-index-html after ipfs/dir-index-html#43 got merged to master
ec164b1
to
c94bd76
Compare
@lidel Apologies for the delay - v1.2.1 of dir-index-html is here: https://github.com/ipfs/dir-index-html/releases/tag/1.2.1 |
This adds proper end-to-end tests for directory listing on Gateway port that protects us against regressions oni each gw type: - path gateway - subdomain gateway - dnslink website gateway Tests cover: - etag/unicode support - breadcrumbs - file name column - hash column
# | ||
# Copyright (c) Protocol Labs | ||
|
||
test_description="Test directory listing (dir-index-html) on the HTTP gateway" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭
This file adds proper end-to-end tests for directory listing on Gateway port that protects us against regressions such as ipfs/dir-index-html#42 by testing each gateway type:
- path gateway
- subdomain gateway
- dnslink website gateway
We check behavior of:
- etag/unicode support
- breadcrumbs
- file name column
- hash column
This level of testing is necessary, because URIs will be different on each gw type, and we literally had no tests for this apart from subdomain ones. Now we test all gw types and I can sleep better ;)
8ae153f
to
4deaf05
Compare
@aschmahmann I believe this is ready for your review. |
fix(dnslink-gw): breadcrumbs and CID column when dir listing This commit was moved from ipfs/kubo@499e011
This PR aims to solve issue described in ipfs/dir-index-html#42
It changes URI of some broken links when directory listing occurs on DNSLink website adds a bunch of tests.
Changes
There are no visual changes to the way directory listing is presented.
dir-index-htm
, this PR is switching to a new release with fix from feat: improved CID column (filename and dnslink support) dir-index-html#43/api
/ipfsand
ą/ś/ć` (utf8)make everything work withX-Ipfs-Gateway-Prefix
X-Ipfs-Gateway-Prefix
is already mostly broken, filled Removing support for X-Ipfs-Gateway-Prefix #7702 to remove it, so not in the scope of this PRHow to tests this PR
This PR mainly fixes the DNSLink mode, which is when domain passed in
Host
header has a valid DNSLink record:$ curl -H "Host: dist.ipfs.io" -sD - "http://127.0.0.1:8080/go-ipfs/v0.7.0"
It may be tricky to understand what is the fix. The best illustration is to look at CID column:
Host
header), CID column links to cid.ipfs.io:Similar fix is applied to breadcrumbs, but we link to domain from dnslink instead of a public gateway.