Add new geolocatio-country-code redirect condition type

This commit is contained in:
Alejandro Celaya
2024-11-12 08:37:22 +01:00
parent a444ed0246
commit 781c083c9f
5 changed files with 43 additions and 3 deletions

View File

@@ -111,6 +111,9 @@ class RedirectRuleHandler implements RedirectRuleHandlerInterface
RedirectConditionType::IP_ADDRESS => RedirectCondition::forIpAddress(
$this->askMandatory('IP address, CIDR block or wildcard-pattern (1.2.*.*)', $io),
),
RedirectConditionType::GEOLOCATION_COUNTRY_CODE => RedirectCondition::forGeolocationCountryCode(
$this->askMandatory('Country code to match?', $io),
)
};
$continue = $io->confirm('Do you want to add another condition?');