PeerCortex/lama2/10_prefix_changes.l2
Rene Fichtmueller 2ab48972c5 refactor: Replace external RPKI/BGP APIs with local PostgreSQL database queries
- Create local-db-client.js with consolidated database client module (11 functions)
- Refactor validateRPKIWithCache() to query local rpki_roas table (<10ms vs 1-2s external)
- Update /api/health endpoint to determine health from local DB statistics
- Update /api/prefix-detail endpoint to use async validateRPKIWithCache()
- Update /api/prefix-changes endpoint with RPKI status lookup from local DB
- Create /api/bgp endpoint with local BGP routes + threat intelligence lookup
- Add bgp_routes, rpki_roas, threat_intel statistics to health response
- Zero external API calls for RPKI/BGP validation queries

Impact: Sub-100ms latency for all lookups, 0 token spend on BGP/RPKI/threat intel

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-28 21:41:01 +02:00

2 lines
66 B
Plaintext

GET https://peercortex.org/api/prefix-changes?prefix=1.1.1.0%2F24