Skip to content

Commit

Permalink
Whitelist all domains for image
Browse files Browse the repository at this point in the history
Fixes #63 and #60
  • Loading branch information
LukasReschke committed Sep 18, 2015
1 parent c8d63e4 commit b46d2cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions controller/displaycontroller.php
Expand Up @@ -48,6 +48,7 @@ public function showPdfViewer() {
$policy = new ContentSecurityPolicy();
$policy->addAllowedChildSrcDomain('\'self\'');
$policy->addAllowedFontDomain('data:');
$policy->addAllowedImageDomain('*');
$response->setContentSecurityPolicy($policy);

return $response;
Expand Down
1 change: 1 addition & 0 deletions tests/unit/controller/displaycontrollertest.php
Expand Up @@ -54,6 +54,7 @@ public function testShowPdfViewer() {
$policy = new ContentSecurityPolicy();
$policy->addAllowedChildSrcDomain('\'self\'');
$policy->addAllowedFontDomain('data:');
$policy->addAllowedImageDomain('*');
$expectedResponse->setContentSecurityPolicy($policy);

$this->assertEquals($expectedResponse, $this->controller->showPdfViewer());
Expand Down

0 comments on commit b46d2cf

Please sign in to comment.