-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #518 from ipfs-shipyard/fix/ipfs-paths-on-dnslink-…
…host Exclude gateway paths from dnslink redirects This PR: - ensures dnslink redirect to `/ipns/{fqdn}/{path}` does not happen for `/ipfs/`, `/ipns/` and `/api/` paths - adds proper dnslink tests ### Rationale Public gateways are often exposed under the same domain name (https://ipfs.io) and even tho right now CID-based redirect takes precedence things could break if we ever do some refactoring and move things around. Rare edge cases which are fixed by this PR: - https://ipfs.io/api/v0/dns/ipfs.io broken due to dnslink triggering redirect to `/ipns/`. - https://ipfs.io/ipfs/invalid_cid in which no valid CID is detected, so path is marked as non-ipfs and dnslink redirect skews original error.
- Loading branch information
Showing
2 changed files
with
101 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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