All notable changes to ipgeolocation-vercel-middleware will be documented here.
This project adheres to Semantic Versioning.
lookupIpGeolocation— fetch geo + security data from IPGeolocation.io v3 APIgetClientIp— safe IP extraction fromx-forwarded-for,x-real-ip,cf-connecting-ipshouldBlockBySecurity— evaluate VPN, proxy, Tor, bot, spam, known attacker, cloud provider, threat scoreparseCsvEnv— parse comma-separated country code env vars into aSetparseRedirectMap— parse JSON country→path redirect mapenvFlag— parse boolean env vars- Full Next.js middleware with country allow/block lists, country redirects, security blocking, geo header forwarding
- In-memory TTL cache (configurable via
IPGEO_CACHE_TTL_MS) - Fail-open / fail-closed mode (
IPGEO_FAIL_CLOSED) - Configurable XFF trust strategy (
IPGEO_TRUST_FIRST_XFF) - 40+ unit tests with Vitest