Add CSP exception for Angular.js

master
Alfred Egger 2019-11-06 15:20:21 +01:00
parent 09455acf8f
commit 1b8b19d08a
1 changed files with 9 additions and 1 deletions

View File

@ -43,7 +43,15 @@ class CityController extends IntermediateController {
* @NoCSRFRequired
*/
public function index () {
return new TemplateResponse($this->appName, 'main');
$response = new TemplateResponse($this->appName, 'main'); // templates/main.php
$csp = new StrictContentSecurityPolicy();
$csp->allowEvalScript();
$csp->allowInlineStyle();
$response->setContentSecurityPolicy($csp);
return $response;
}
/**