Repository navigation
v0.12.0
SSRF guard (opt-in)
createFetch({ ssrfGuard: true }) refuses requests to private, loopback, link-local and cloud-metadata targets — and re-checks every redirect hop, because reqkit now follows redirects itself while the guard is on.
Blocked: 0.0.0.0/8, 10/8, 127/8, 169.254/16 (incl. 169.254.169.254), 172.16/12, 192.168/16, 100.64/10, multicast/reserved, IPv6 ::, ::1, fe80::/10, fc00::/7, IPv4-mapped forms, localhost, cloud metadata hostnames, and all non-http(s) schemes.
- Hostnames resolve on Node and fail closed on resolution errors (Bun/Deno/Workers: literal + redirect checks only).
- Every hop re-checked up to
maxRedirects(default 5) →SSRFBlockedErrorpast that. - Dev escape hatches:
{ allowHosts: ["localhost"] }orallowPrivate: true. - New exports:
createSsrfGuard,SSRFBlockedError(CJS + ESM + typed).
Opt-in by design — the guard changes redirect semantics. Servers fetching user-supplied URLs should turn it on; localhost dev stays untouched.
Docs
- Removed the self-reported conformance scorecard (returns once the upstream fetch-kit/http-resilience adapter merges).
- Security section rewritten around the guard; SECURITY.md scope updated; stale pinned CDN version fixed; npm downloads + release badges added.
373 tests (10 new for the guard), typecheck, smoke, and the bundle-parity suite all green. Zero dependencies. npm i @boy-offi9-inc/reqkit