public function SecKitEventSubscriber::seckitFeaturePolicy in Security Kit 8
Same name and namespace in other branches
- 2.x src/EventSubscriber/SecKitEventSubscriber.php \Drupal\seckit\EventSubscriber\SecKitEventSubscriber::seckitFeaturePolicy()
Sends Feature-Policy HTTP response header.
Implementation is based on specification draft available at https://developers.google.com/web/updates/2018/06/feature-policy.
1 call to SecKitEventSubscriber::seckitFeaturePolicy()
- SecKitEventSubscriber::onKernelResponse in src/
EventSubscriber/ SecKitEventSubscriber.php - Executes actions on the response event.
File
- src/
EventSubscriber/ SecKitEventSubscriber.php, line 500
Class
- SecKitEventSubscriber
- Subscribing an event.
Namespace
Drupal\seckit\EventSubscriberCode
public function seckitFeaturePolicy() {
$header[] = $this->config
->get('seckit_fp.feature_policy_policy');
$this->response->headers
->set('Feature-Policy', $header);
}