Reader

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

| Vercel News | Default

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.

The x-vercel-ip-postal-code header is accessible in Vercel Functions, including Edge Middleware. Here's a TypeScript example:

Postal codes are also available via the @vercel/functions package:

For more information on headers and geolocation, see Vercel’s request header documentation.

Read more