You are here

public function SecKitEventSubscriber::seckitFromOrigin in Security Kit 8

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

Sends From-Origin HTTP response header.

Implementation is based on specification draft available at http://www.w3.org/TR/from-origin.

1 call to SecKitEventSubscriber::seckitFromOrigin()
SecKitEventSubscriber::onKernelResponse in src/EventSubscriber/SecKitEventSubscriber.php
Executes actions on the response event.

File

src/EventSubscriber/SecKitEventSubscriber.php, line 458

Class

SecKitEventSubscriber
Subscribing an event.

Namespace

Drupal\seckit\EventSubscriber

Code

public function seckitFromOrigin() {
  $value = $this->config
    ->get('seckit_various.from_origin_destination');
  $this->response->headers
    ->set('From-Origin', $value);
}