Merge branch 'master' into jajaja

# Conflicts:
#	package.json
#	pnpm-lock.yaml
#	src/lib/detect.ts
This commit is contained in:
Mike Cao 2025-07-08 18:45:02 -07:00
commit 5ed1d710cb
4 changed files with 5 additions and 4 deletions

View file

@ -130,7 +130,7 @@ export async function getLocation(ip: string = '', headers: Headers, hasPayloadI
);
}
const result = globalThis[MAXMIND].get(ip);
const result = globalThis[MAXMIND].get(ip?.split(':')[0]);
if (result) {
const country = result.country?.iso_code ?? result?.registered_country?.iso_code;

View file

@ -150,6 +150,7 @@
try {
const res = await fetch(endpoint, {
keepalive: true,
method: 'POST',
body: JSON.stringify({ type, payload }),
headers: {