• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/service/geoip/maxmind.php
  • Класс: BitrixMainServiceGeoIpMaxMind
  • Вызов: MaxMind::getEndpoint
protected function getEndpoint(): string
{
	static $endpoints = [
		'GeoLite2Country' => 'https://geolite.info/geoip/v2.1/country/',
		'GeoLite2City' => 'https://geolite.info/geoip/v2.1/city/',
		'GeoIP2Country' => 'https://geoip.maxmind.com/geoip/v2.1/country/',
		'GeoIP2City' => 'https://geoip.maxmind.com/geoip/v2.1/city/',
		'GeoIP2Insights' => 'https://geoip.maxmind.com/geoip/v2.1/insights/',
	];

	$service = $this->config['SERVICE'] ?? 'GeoIP2City';
	if (isset($endpoints[$service]))
	{
		return $endpoints[$service];
	}
	return $endpoints['GeoIP2City'];
}