|
@@ -10,8 +10,8 @@ xhr.addEventListener("loadend", async function (e){
|
|
|
let ip = responseObj.ip;
|
|
|
let regionData = await ipToRegion(ip);
|
|
|
let country = window.location.protocol === 'https:' ? regionData.country_name : regionData.geoplugin_countryName
|
|
|
- if (window.regionMap[regionData.geoplugin_countryName]) {
|
|
|
- window.location.href = window.regionMap[regionData.geoplugin_countryName]
|
|
|
+ if (window.regionMap[country]) {
|
|
|
+ window.location.href = window.regionMap[country]
|
|
|
}
|
|
|
});
|
|
|
xhr.send();
|