@@ -133,13 +133,11 @@ hints:
133133 hint2: value2
134134---
135135# Blocking by CID - blocks wrapped multihash.
136- # Does not block subpaths.
136+ # Does not block subpaths per se, but might stop an implementation
137+ # from resolving subpaths if this block is not retrievable.
137138/ipfs/bafybeihvvulpp4evxj7x7armbqcyg6uezzuig6jp3lktpbovlqfkuqeuoq
138139
139- # Block all subpaths
140- /ipfs/QmdWFA9FL52hx3j9EJZPQP1ZUH8Ygi5tLCX2cRDs6knSf8/*
141-
142- # Block some subpaths (equivalent rules)
140+ # Blocking by subpath (equivalent rules)
143141/ipfs/Qmah2YDTfrox4watLCr3YgKyBwvjq8FJZEFdWY6WtJ3Xt2/test*
144142/ipfs/QmTuvSQbEDR3sarFAN9kAeXBpiBCyYYNxdxciazBba11eC/test/*
145143
@@ -280,7 +278,11 @@ When users want to block by multihash directly, they must base58btc-encoded
280278multihashes. This rule does not block subpaths that start at this CID, only
281279the CID itself.
282280
283- Blocking layer recommendation: BlockService.
281+ Blocking layer recommendation: BlockService (or PathResolver if wanting to
282+ block by path only).
283+
284+ ** NOTE** : See note in ` /ipfs/CID/* ` below, as to why this rule may effectively
285+ block all subpaths too.
284286
285287##### ` /ipfs/CID/PATH `
286288
@@ -298,11 +300,22 @@ IPFS-Path-Prefix-Rule: Blocks any multihash-path combination starting with the
298300the given path prefix. ` /* ` includes the empty path. Thus ` /ipfs/CID/* `
299301blocks the CID itself, and any paths. Examples:
300302
301- - ` /ipfs/CID/* ` : blocks CID (by multihash) and any path before resolving.
303+ - ` /ipfs/CID/* ` : blocks CID (by multihash) and any path BEFORE resolving.
302304- ` /ipfs/CID/ab* ` : blocks any path derived from the CID (multihash) and starting with "ab", including "ab"
303305- ` /ipfs/CID/ab/* ` : equivalent to the above.
304306
305- Blocking layer recommendation: PathResolver + (BlockService if the CID itself is blocked too).
307+ Blocking layer recommendation: PathResolver
308+
309+ ** NOTE** : When the rule ` /ipfs/CID ` exists and BlockService-level blocking
310+ exists, subpaths of CID will effectively be blocked in the process of being
311+ resolved, as we would disallow fetching the root CID, even if the subpath
312+ itself is not block. This causes ` /ipfs/CID ` to behave like
313+ ` /ipfs/CID/* ` . In cases where all requests go through the PathResolver,
314+ blocking at the BlockService could be disabled. In that case fetching
315+ ` /ipfs/CID ` would be allowed even if that rule existed, when the process is
316+ part of the resolution of a subpath that is not blocked. Implementations can
317+ decide which model they want to adopt.
318+
306319
307320##### ` /ipns/IPNS `
308321
0 commit comments