(address)
| 192 | } |
| 193 | |
| 194 | function isPrivateOrReservedAddress(address) { |
| 195 | const mappedIpv4 = getMappedIpv4(address); |
| 196 | if (mappedIpv4) { |
| 197 | return PRIVATE_IPV4_BLOCKLIST.check(mappedIpv4, "ipv4"); |
| 198 | } |
| 199 | |
| 200 | const family = net.isIP(address); |
| 201 | if (family === 4) { |
| 202 | return PRIVATE_IPV4_BLOCKLIST.check(address, "ipv4"); |
| 203 | } |
| 204 | if (family === 6) { |
| 205 | return PRIVATE_IPV6_BLOCKLIST.check(address, "ipv6"); |
| 206 | } |
| 207 | return false; |
| 208 | } |
| 209 | |
| 210 | function createPolicyLogPayload(url, context, reason, extra = {}) { |
| 211 | return { |
no test coverage detected