Skip to content

Commit

Permalink
Fixed wrong country lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Mar 8, 2025
1 parent 97c687f commit abde966
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/detect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export async function getClientInfo(request: Request, payload: Record<string, an
const userAgent = payload?.userAgent || request.headers.get('user-agent');
const ip = payload?.ip || getIpAddress(request.headers);
const location = await getLocation(ip, request.headers, !!payload?.ip);
const country = payload?.userAgent || location?.country;
const country = location?.country;
const subdivision1 = location?.subdivision1;
const subdivision2 = location?.subdivision2;
const city = location?.city;
Expand Down

0 comments on commit abde966

Please sign in to comment.