Skip to content

fix(api): skip public lookups for non-routable hosts#311

Open
Gujiassh wants to merge 1 commit into
lissy93:masterfrom
Gujiassh:fix/non-routable-public-api-skip-302
Open

fix(api): skip public lookups for non-routable hosts#311
Gujiassh wants to merge 1 commit into
lissy93:masterfrom
Gujiassh:fix/non-routable-public-api-skip-302

Conversation

@Gujiassh
Copy link
Copy Markdown

@Gujiassh Gujiassh commented Jun 4, 2026

Summary

  • skip third-party public API lookups when the target is a direct non-routable host such as RFC1918 IPv4, localhost, link-local, or IPv6 ULA
  • add a shared host-scope helper and focused node tests for the non-routable classification
  • apply the guard to Archive, IP geolocation, Tranco rank, Shodan, and threat-intelligence lookups

Testing

  • node --test api/_common/target-scope.test.js
  • git diff --check

Fixes #302

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 4, 2026

βœ… Deploy Preview for web-check ready!

Built without sensitive environment variables

Name Link
πŸ”¨ Latest commit 7088da8
πŸ” Latest deploy log https://app.netlify.com/projects/web-check/deploys/6a21124137559b00086d44f1
😎 Deploy Preview https://deploy-preview-311--web-check.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
πŸ€– Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Don't bother using public APIs on non-routable IP addresses

1 participant