Dupe Check
Describe the solution you'd like?
Many proxies (CloudFront, Cloudflare...etc) already added headers which provide user location info and usually more accurate than lookup location via IP address. So IMO allow config to use these headers to determine user location is more efficient, and it also faster (since just need to read header). And fallback to use ip lookup if headers is omit.
Example
// Current code
const ip = getIPFromHeaders(headers) || reqIP || ''
const { country, city, region } = getGeoDetails(ip)
// New
let { ip, location } = getClientRequestInfo(headers);
if (!location) {
location = getGeoDetails(ip);
}
Additional context
No response
How important is this feature to you?
3
Dupe Check
Describe the solution you'd like?
Many proxies (CloudFront, Cloudflare...etc) already added headers which provide user location info and usually more accurate than lookup location via IP address. So IMO allow config to use these headers to determine user location is more efficient, and it also faster (since just need to read header). And fallback to use ip lookup if headers is omit.
Example
Additional context
No response
How important is this feature to you?
3