Fixed vercel issues.

This commit is contained in:
Mike Cao committed 2023-04-25 15:58:52 -07:00
1 parent c49e2c6974
commit 5864aee043
2 files changed
+6 -21

No files matched your search

+2 -2
View File
@@ -65,8 +65,8 @@ export async function getLocation(ip, req) {
if (req.headers['x-vercel-ip-country']) {
return {
country: req.headers['x-vercel-ip-country'],
subdivision1: `${req.headers['x-vercel-ip-country']}-${req.headers['x-vercel-ip-country-region']}`,
city: req.headers['x-vercel-ip-city'],
subdivision1: req.headers['x-vercel-ip-country-region'],
city: decodeURIComponent(req.headers['x-vercel-ip-city']),
};
}