HttpProtect.isBanned() method

Whether an address is currently on the block list.

Signature:

isBanned(ip: string): Promise<boolean>;

Parameters

Parameter

Type

Description

ip

string

the address to check, without a prefix length

Returns:

Promise<boolean>

true if it is banned.

Exceptions

TypeError if ip is not a valid address, including an empty string.

Remarks

Asynchronous, and it reloads the entire block list to answer — via HttpProtect.bannedNetworks(), whose IPv6 over-match it inherits, so this can return true for an IPv6 address that was never banned. For IPv4 it is exact.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.