I am attempting to use Firebase from within a Chrome App (not an extension) and have not been able to work around the following error:
Refused to load the script 'https://{my firebase id}.firebaseio.com/.lp?start=t&ser=81980096&cb=15&v=5' because it violates the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
my manifest.json file looks like this:
{
"manifest_version": 2,
"name": "Simple Demo",
"version": "1",
"icons": {
"128": "icon_128.png"
},
"permissions": ["https://*.firebaseio.com/"],
"app": {
"background": {
"scripts": ["background.js"]
}
},
"minimum_chrome_version": "28"
}
I have the firebase.js script local to the chrome app, the issue seems to be that it tries to load other scripts which isn't permitted.
Any ideas are appreciated.
{ "content_security_policy": "script-src 'self' https://cdn.firebase.com https://*.firebaseio.com; object-src 'self'" }
in your manifest? – Dayton Wang