You are here

protected function MobileDeviceDetectionObject::setUserAgentHeaders in Mobile Device Detection 8

1 call to MobileDeviceDetectionObject::setUserAgentHeaders()
MobileDeviceDetectionObject::init in src/Object/MobileDeviceDetectionObject.php

File

src/Object/MobileDeviceDetectionObject.php, line 148

Class

MobileDeviceDetectionObject

Namespace

Drupal\mobile_device_detection\Object

Code

protected function setUserAgentHeaders($headers) {
  $this->user_agent_headers = join(' ', array_intersect_key($this
    ->getMobileHeaders(), array_flip($headers)));
  if (!$this->user_agent_headers && !empty($this
    ->getCloudHeaders())) {
    $this->user_agent_headers = 'Amazon CloudFront';
  }
}