protected function Cdn::checkCloudFront in GeoIP API 8.2
Check for Amazon CloudFront geolocation header.
Return value
string The country code specified in the header.
1 call to Cdn::checkCloudFront()
- Cdn::geolocate in src/
Plugin/ GeoLocator/ Cdn.php - Performs geolocation on an address.
File
- src/
Plugin/ GeoLocator/ Cdn.php, line 68
Class
- Cdn
- CDN geolocation provider.
Namespace
Drupal\geoip\Plugin\GeoLocatorCode
protected function checkCloudFront() {
return !empty($_SERVER['HTTP_CLOUDFRONT_VIEWER_COUNTRY']) ? $_SERVER['HTTP_CLOUDFRONT_VIEWER_COUNTRY'] : NULL;
}