isPrivateV6
@forge/monorepo / backend/src / isPrivateV6
Function: isPrivateV6()
isPrivateV6(
host):boolean
Defined in: backend/src/toolkit/ssrf.ts:94
Whether an IPv6 address is somewhere a fetch must not go.
The mapped and embedded forms are the interesting part: ::ffff:169.254.169.254 and ::169.254.169.254 are
both the metadata address, and 2002:a9fe:a9fe:: is it again inside a 6to4 prefix. A v6 check that does not
look inside those is a v4 check with extra steps.
Parameters
host
string
Returns
boolean