Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
42 | 1 | public function showPdfViewer() { |
|
43 | $params = [ |
||
44 | 1 | 'urlGenerator' => $this->urlGenerator |
|
45 | 1 | ]; |
|
46 | 1 | $response = new TemplateResponse($this->appName, 'viewer', $params, 'blank'); |
|
47 | |||
48 | 1 | $policy = new ContentSecurityPolicy(); |
|
49 | 1 | $policy->addAllowedChildSrcDomain('\'self\''); |
|
50 | 1 | $policy->addAllowedFontDomain('data:'); |
|
51 | 1 | $policy->addAllowedImageDomain('*'); |
|
52 | 1 | $policy->allowEvalScript(false); |
|
53 | 1 | $response->setContentSecurityPolicy($policy); |
|
54 | |||
55 | 1 | return $response; |
|
56 | } |
||
57 | |||
59 |