Skip to content

Commit eb7add8

Browse files
committed
fix: refine only negative address filter behaviour
1 parent f585210 commit eb7add8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ipips/ipip-0484.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ The proposed change is to add a `?filter-addrs` parameter to the `GET /routing/v
5151
- `unknown` can be be passed to include providers whose multiaddrs are unknown, e.g. `?filter-addrs=unknown`. This allows filtering providers whose multiaddrs are unknown at the time of filtering.
5252
- Multiaddrs are filtered by checking if the protocol name appears in any of the multiaddrs (logical OR).
5353
- Negative filtering is done by prefixing the protocol name with `!`, e.g. `?filter-addrs=!quic-v1,!tcp`. Note that negative filtering is done by checking if the protocol name does not appear in any of the multiaddrs (logical AND).
54-
- For an address to pass the filter, it must pass all negative filters AND match at least one positive filter.
55-
- Only multiaddrs that pass the filter are included in the response.
54+
- If no parameter is passed, the default behavior is to return the original list of addresses unchanged.
55+
- If only negative filters are provided, addresses not passing any of the negative filters are included.
56+
- If positive filters are provided, only addresses passing at least one positive filter (and no negative filters) are included.
57+
- If both positive and negative filters are provided, the address must pass all negative filters and at least one positive filter to be included.
5658
- If there are no multiaddrs that match the passed transports, the provider is omitted from the response.
5759
- Filtering is case-insensitive.
58-
- If no parameter is passed, the default behavior is to not apply filtering by network transports.
5960

6061
### Transfer Protocol Filtering
6162

0 commit comments

Comments
 (0)