You are here

public function SecKitEventSubscriber::onKernelRequest in Security Kit 8

Same name and namespace in other branches
  1. 2.x src/EventSubscriber/SecKitEventSubscriber.php \Drupal\seckit\EventSubscriber\SecKitEventSubscriber::onKernelRequest()

Executes actions on the request event.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: Event Response Object.

File

src/EventSubscriber/SecKitEventSubscriber.php, line 71

Class

SecKitEventSubscriber
Subscribing an event.

Namespace

Drupal\seckit\EventSubscriber

Code

public function onKernelRequest(GetResponseEvent $event) {
  $this->request = $event
    ->getRequest();

  // Execute necessary functions.
  if ($this->config
    ->get('seckit_csrf.origin')) {
    $this
      ->seckitOrigin($event);
  }
}