Menu

Requester's public IP postal code now available in Vercel Functions - Vercel
📰
0

Requester's public IP postal code now available in Vercel Functions - Vercel

Vercel News·Shohei Maeda·4 days ago
#GPOBQfMF
Reading 0:00
15s threshold

The x-vercel-ip-postal-code header is now part of Vercel’s geolocation capabilities , providing the postal code associated with the requester’s public IP address. This complements existing headers like x-vercel-ip-country , x-vercel-ip-city , and x-vercel-ip-country-region . This information should be used as a general reference rather than a precise locator. Due to inherent limitations and variability in IP-based geolocation, the accuracy may vary. We recommend complementing it with other data sources, such as the Geolocation API , for critical applications. The x-vercel-ip-postal-code header is accessible in Vercel Functions, including Edge Middleware . Here's a TypeScript example: export function GET ( request : Request ) { const postalCode = request . headers .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More