Skip to content

Commit

Permalink
allow inline/eval script if debug mode is turned on
Browse files Browse the repository at this point in the history
  • Loading branch information
powerpaul17 committed Nov 8, 2023
1 parent 70aed07 commit 2c68e19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ public function index(): TemplateResponse
->addAllowedFrameDomain('https://www.player.vimeo.com')
->addAllowedFrameDomain('https://vk.com')
->addAllowedFrameDomain('https://www.vk.com');

if($this->settings->getSystemValue('debug')) {
$csp->allowInlineScript(true);
$csp->allowEvalScript(true);
}

$response->setContentSecurityPolicy($csp);

return $response;
Expand Down

0 comments on commit 2c68e19

Please sign in to comment.