Skip to content
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

Exclude gateway paths from dnslink redirects #518

Merged
merged 1 commit into from
Jul 16, 2018

Conversation

lidel
Copy link
Member

@lidel lidel commented Jul 7, 2018

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:

Public gateways are often exposed under the same domain name and even
tho right now CID-based redirect takes precedence, without this check
things could break if we ever do some refactoring and move things around.

This does not change anything, just deduplicates code and adds
additional check to ensure dnslink redirect should not happen
for assets in /ipfs/ and /ipns/ paths
@lidel lidel added the kind/bug A bug in existing code (including security flaws) label Jul 7, 2018
@lidel lidel merged commit e013d40 into master Jul 16, 2018
@lidel lidel deleted the fix/ipfs-paths-on-dnslink-host branch July 16, 2018 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant