GeoLocation is a .NET 9 workload that fronts MaxMind lookups with an Entra-protected API and caches results in Azure Table Storage to reduce latency and cost. The API exposes two versioned endpoint groups:
- v1.0: Single/batch hostname/IP lookup, metadata deletion, and API info — cached permanently in the
geolocationstable - v1.1: City and Insights lookups with typed DTOs and MaxMind Anonymizer support — cached in the
geolocationsv11table (city: permanent, insights: configurable TTL)
Both versions enforce the LookupApiUser Entra role. An MVC web front end calls the API using API-key and Entra authentication, handles Cloudflare/X-Forwarded-For headers, and stores the user’s last lookup in session. The API serves its OpenAPI specs at runtime at /openapi/v1.0.json and /openapi/v1.1.json, and infrastructure is managed by Terraform under terraform/. Build versioning uses Nerdbank.GitVersioning.
| Package | Description |
|---|---|
MX.GeoLocation.Abstractions.V1 |
Interfaces and models for the GeoLocation API |
MX.GeoLocation.Api.Client.V1 |
Typed HTTP client with DI registration via AddGeoLocationApiClient() |
MX.GeoLocation.Api.Client.Testing |
In-memory fakes and DTO factory helpers for consumer test projects — see testing docs |
Please read the contributing guidance; this is a learning and development project.
Please read the security guidance; I am always open to security feedback through email or opening an issue.