Unrecognized Content-Security-Policy directive 'script-src:'
Asked Answered
C

1

8

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?

Caelian answered 18/12, 2015 at 9:46 Comment(0)
V
13

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.

Valse answered 18/12, 2015 at 18:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.