Add CSP exception for Angular.js
parent
09455acf8f
commit
1b8b19d08a
|
@ -43,7 +43,15 @@ class CityController extends IntermediateController {
|
||||||
* @NoCSRFRequired
|
* @NoCSRFRequired
|
||||||
*/
|
*/
|
||||||
public function index () {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue