pabio/redirect-russia

`countryCode` should be tested as a lower case string

Closed this issue · 1 comments

Description

countryCode string variable should be tested as a lower case string due to

countryCode = json.country.toLowerCase();

v1.ts, L.129

Relevant Context

In IP geolocation request code section.

if (countryCode === "RU") return redirect();

v1.ts, L.134

Solution

Change "RU" by "ru" like

if (countryCode === "ru") return redirect();

Thanks so much, all fixed!