Skip to content

Commit

Permalink
move in same loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sami-sweng committed Sep 5, 2024
1 parent 89c219c commit 353c2bf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function index()
$domainsArray = explode(' ', $domains); // Split the env variable by spaces
foreach ($domainsArray as $domain) {
$csp->addAllowedFrameDomain($domain);
$csp->addAllowedConnectDomain($domain);
}
}

Expand All @@ -75,12 +76,6 @@ public function index()
$csp->addAllowedConnectDomain('id.thehip.app');
$csp->addAllowedConnectDomain('dev.id.thehip.app');
$csp->addAllowedConnectDomain('stats.humanbrainproject.eu');
if ($domains = getenv('ALLOWED_FRAME_DOMAINS', true)) {
$domainsArray = explode(' ', $domains); // Split the env variable by spaces
foreach ($domainsArray as $domain) {
$csp->addAllowedConnectDomain($domain);
}
}


$response->setContentSecurityPolicy($csp);
Expand Down

0 comments on commit 353c2bf

Please sign in to comment.