Skip to content

Commit

Permalink
Enforce content security policy
Browse files Browse the repository at this point in the history
  • Loading branch information
gapple committed Jun 19, 2017
1 parent 70469e4 commit 59c847a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.php
Expand Up @@ -17,13 +17,13 @@

if (stripos($response->headers->get('Content-Type'), 'text/html') !== false) {
$response->headers->set(
'Content-Security-Policy-Report-Only',
'Content-Security-Policy',
"default-src 'self'; " .
"script-src 'self' 'unsafe-inline' code.jquery.com www.google.com www.google-analytics.com; " .
"style-src 'self' 'unsafe-inline' netdna.bootstrapcdn.com www.google.com ajax.googleapis.com; " .
"img-src 'self' s3.amazonaws.com www.google-analytics.com stats.g.doubleclick.net; " .
"connect-src 'self' www.drupal.org www.google-analytics.com;" .
"report-uri https://gapple.report-uri.io/r/default/csp/reportOnly;"
"report-uri https://gapple.report-uri.io/r/default/csp/enforce;"
);
}
});
Expand Down

0 comments on commit 59c847a

Please sign in to comment.