HttpProtectOptions.safeNetworks property
CIDR networks exempt from counting, limiting and banning.
Signature:
safeNetworks?: string[];
Default Value
[] — nothing is exempt
Remarks
Matching addresses short-circuit HttpProtect.verify() before it touches Redis, so they are never counted and can never be banned — which also means an exempt address is answered SAFE even when Redis is unreachable. Use it for your own services, health checks and monitoring.
Every entry must carry a prefix length. 10.0.0.0/8 is a network and 203.0.113.7/32 is a single host, but a bare 203.0.113.7 is rejected — @imqueue/net throws while parsing it, so the HttpProtect constructor throws too. Use /32 for one IPv4 host and /128 for one IPv6 host. The list is read once, in the constructor, into HttpProtect.safeNetworks; adding to it later needs a new instance.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.