Skip to content

Commit 7a40db0

Browse files
committed
compact denylist: switch to "!" for negations
1 parent 6569655 commit 7a40db0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

COMPACT_DENYLIST_FORMAT.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ hints:
145145
146146
# Block some subpaths with exceptions: last-matching-rule wins (!)
147147
/ipfs/QmUboz9UsQBDeS6Tug1U8jgoFkgYxyYood9NDyVURAY9pK/blocked*
148-
+/ipfs/QmUboz9UsQBDeS6Tug1U8jgoFkgYxyYood9NDyVURAY9pK/blockednot
149-
+/ipfs/QmUboz9UsQBDeS6Tug1U8jgoFkgYxyYood9NDyVURAY9pK/blocked/not
150-
+/ipfs/QmUboz9UsQBDeS6Tug1U8jgoFkgYxyYood9NDyVURAY9pK/blocked/exceptions*
148+
!/ipfs/QmUboz9UsQBDeS6Tug1U8jgoFkgYxyYood9NDyVURAY9pK/blockednot
149+
!/ipfs/QmUboz9UsQBDeS6Tug1U8jgoFkgYxyYood9NDyVURAY9pK/blocked/not
150+
!/ipfs/QmUboz9UsQBDeS6Tug1U8jgoFkgYxyYood9NDyVURAY9pK/blocked/exceptions*
151151
152152
# Block IPNS domain name
153153
/ipns/domain.example
@@ -160,7 +160,7 @@ hints:
160160
161161
# Block all mime types with exceptions
162162
/mime/image/*
163-
+/mime/image/gif
163+
!/mime/image/gif
164164
165165
# Legacy CID double-hash block
166166
# sha256(bafybeiefwqslmf6zyyrxodaxx4vwqircuxpza5ri45ws3y5a62ypxti42e/)
@@ -381,7 +381,7 @@ blocks get assembled into an actual files. That should cover gateway usage.
381381

382382
#### Allow (or negated) rules
383383

384-
Block items can be prepended by `+`, which means that items matching the rule are to be allowed rather than blocked.
384+
Block items can be prepended by `!`, which means that items matching the rule are to be allowed rather than blocked.
385385

386386
This can be used to undo existing rules, but also to add concrete exceptions to wider rules. Order matters, and Allow rules must come AFTER other existing rules.
387387

@@ -394,15 +394,15 @@ Examples:
394394

395395
```
396396
/ipfs/QmecDgNqCRirkc3Cjz9eoRBNwXGckJ9WvTdmY16HP88768/photo*
397-
+/ipfs/QmecDgNqCRirkc3Cjz9eoRBNwXGckJ9WvTdmY16HP88768/photo123.jpg
397+
!/ipfs/QmecDgNqCRirkc3Cjz9eoRBNwXGckJ9WvTdmY16HP88768/photo123.jpg
398398
/mime/*
399-
+/mime/text/plain
400-
+/ipns/my.domain
399+
!/mime/text/plain
400+
!/ipns/my.domain
401401
/ipns/my.domain
402402
```
403403

404404
In this example, `/ipns/my.domain` stays blocked because the deny rule happens
405-
after the allow one.
405+
AFTER the allow one.
406406

407407
#### Hint list
408408

0 commit comments

Comments
 (0)