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

Kingalione picture Kingalione · Dec 18, 2015 · Viewed 13.9k times · Source

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?

Answer

oreoshake picture oreoshake · Dec 18, 2015

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.