Skip to content

Commit

Permalink
fix: fail fast if root id is not cid and ns is ipfs
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jun 1, 2023
1 parent 7cd8aee commit 15e7580
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gateway/hostname.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ func toSubdomainURL(hostname, path string, r *http.Request, inlineDNSLink bool,
// update path prefix to use real FQDN with DNSLink
rootID = dnsLabel
}
} else if ns == "ipfs" {
return "", fmt.Errorf("invalid path %q: %w", path, err)
}
}

Expand Down

0 comments on commit 15e7580

Please sign in to comment.