Reputation: 4366
Why am I receiving errors like this?
Refused to load the script 'http://maps.googleapis.com/maps/api/js?v=3&sensor=false'
because it violates the following Content Security Policy directive:
"script-src 'self' *.googleapis.com 'unsafe-inline' 'unsafe-eval'".
my meta-tag:
<meta http-equiv="Content-Security-Policy"
content="default-src *; style-src 'self' *.googleapis.com 'unsafe-inline'; script-src 'self' *.googleapis.com 'unsafe-inline' 'unsafe-eval'">
Upvotes: 0
Views: 1485
Reputation: 4366
Seems like I needed explicit URI-scheme. This work:
<meta http-equiv="Content-Security-Policy"
content="default-src *;
script-src 'self' 'unsafe-inline' 'unsafe-eval'
127.0.0.1:*
http://*.gstatic.com
http://*.googleapis.com
https://*.gstatic.com
https://*.googleapis.com
;
style-src 'self' 'unsafe-inline'
127.0.0.1:*
http://*.gstatic.com
http://*.googleapis.com
https://*.gstatic.com
https://*.googleapis.com
">
Upvotes: 5