agentskit.js

isPrivateHost

Auto-generated API reference for isPrivateHost.

Function: isPrivateHost()

isPrivateHost(host): Promise<boolean>

Defined in: safe-fetch.ts:73

Decide whether host resolves to a private/loopback/link-local address. Host literals are checked exactly; hostnames are resolved via node:dns/promises when available. Fails closed on any DNS failure (e.g. edge runtime) so a misconfigured resolver can't open the SSRF gap.

#Parameters

#host

string

#Returns

Promise<boolean>

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page