You are here

public static function HtmlResponseSubscriber::getSubscribedEvents in CDN 8.3

File

src/EventSubscriber/HtmlResponseSubscriber.php, line 84

Class

HtmlResponseSubscriber

Namespace

Drupal\cdn\EventSubscriber

Code

public static function getSubscribedEvents() {

  // This event subscriber wants to directly manipulate the Symfony response
  // object's headers. Therefore we must run after
  // \Drupal\Core\Render\HtmlResponseAttachmentsProcessor::processAttachments,
  // which would otherwise overwrite us. That is called by
  // \Drupal\Core\EventSubscriber\HtmlResponseSubscriber (priority 0), so
  // use a lower priority.
  $events[KernelEvents::RESPONSE][] = [
    'onRespond',
    -10,
  ];
  return $events;
}