Total Complexity | 2 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ResponseListener implements EventSubscriberInterface |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * Add x-frame-options header to mitigate clickjacking |
||
13 | */ |
||
14 | public function onKernelResponse(FilterResponseEvent $event) |
||
15 | { |
||
16 | $event->getResponse()->headers->set('x-frame-options', 'deny'); |
||
17 | } |
||
18 | |||
19 | public static function getSubscribedEvents() |
||
23 | ); |
||
24 | } |
||
26 |