Reputation: 10696
I working on experimental learn-by-doing project. My chrome extensions (loading unpacked locally) has some AJAX calls (cross domain, JSONP)
Unfortunately, I get the following error message:
Refused to load the script 'http://localhost:3318/servicestack.ashx/api/?callback=cb&ActionName=DoStuff&_=1370346168979' because it violates the following Content Security Policy directive: "script-src 'self' http://localhost".
Here is my manifest file:
{
"manifest_version": 2,
"name": "Testing Chrome",
"description": "Test test test",
"version": "1.0",
"permissions" : [
"http://localhost/"
],
"browser_action": {
"default_icon": "icon.png",
"default_popup": "index.html"
},
"content_security_policy": "script-src 'self' http://localhost; object-src 'self'"
}
Any suggestions on what is wrong, please?
Upvotes: 0
Views: 1070
Reputation: 18524
The restriction against resources loaded over HTTP applies only to those resources which are directly executed.
Is the script directly executed or do you have JSONP mechanism?
Upvotes: 1