Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized Content-Security-Policy directive 'script-src:'

in my ionic application I've added crosswalk to get a better android performance. But if I run the application I get this error:

Unrecognized Content-Security-Policy directive 'script-src:'.

My Content-Security-Policy looks like this:

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src: 'self' 'unsafe-inline' 'unsafe-eval'">

Why is this Content-Security-Policy throwing an error?

like image 624
Kingalione Avatar asked Dec 18 '15 09:12

Kingalione


1 Answers

It should be:

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

The : value does not belong anywhere in a policy as a delimiter.

like image 182
oreoshake Avatar answered Jan 19 '23 16:01

oreoshake