public function WebformShareEventSubscriber::onResponse in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_share/src/EventSubscriber/WebformShareEventSubscriber.php \Drupal\webform_share\EventSubscriber\WebformShareEventSubscriber::onResponse()
Remove 'X-Frame-Options' from the response header for shared webforms.
Parameters
\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event: The response event.
File
- modules/
webform_share/ src/ EventSubscriber/ WebformShareEventSubscriber.php, line 39
Class
- WebformShareEventSubscriber
- Event subscriber to allow webform to be shared via an iframe.
Namespace
Drupal\webform_share\EventSubscriberCode
public function onResponse(FilterResponseEvent $event) {
if (!WebformShareHelper::isPage($this->routeMatch)) {
return;
}
$response = $event
->getResponse();
$response->headers
->remove('X-Frame-Options');
}