diff --git a/gateway/hostname.go b/gateway/hostname.go index 782b5c4ad..082f82074 100644 --- a/gateway/hostname.go +++ b/gateway/hostname.go @@ -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) } }