summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-01 14:38:29 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-01 14:38:29 -0500
commit3e2f4f9c2cd4cd67bee428a23ce55fc36b8c6e31 (patch)
treea4b660df47078f956c421cee875953d95f7800fc
parent41a344e9cedd510529941770292ab47a6e82e815 (diff)
Simplify CSP header method
-rw-r--r--app/Core/Response.php19
1 files changed, 1 insertions, 18 deletions
diff --git a/app/Core/Response.php b/app/Core/Response.php
index 1ce42ad3..d42a8f1e 100644
--- a/app/Core/Response.php
+++ b/app/Core/Response.php
@@ -212,24 +212,7 @@ class Response
$policies['default-src'] = "'self'";
$values = '';
- foreach ($policies as $policy => $hosts) {
-
- if (is_array($hosts)) {
-
- $acl = '';
-
- foreach ($hosts as &$host) {
-
- if ($host === '*' || $host === 'self' || strpos($host, 'http') === 0) {
- $acl .= $host.' ';
- }
- }
- }
- else {
-
- $acl = $hosts;
- }
-
+ foreach ($policies as $policy => $acl) {
$values .= $policy.' '.trim($acl).'; ';
}