javascript - Chrome Plugin and Content Security Policy errors -


when uploading unpacked chrome extension, following error:

could not load extension '/users/me/example'. invalid value 'content_security_policy': both 'script-src' , 'object-src' directives must specified (either explicitly, or implicitly via 'default-src'), , both must whitelist secure resources. may include of following sources: "'self'", "'unsafe-eval'", "http://127.0.0.1", "http://localhost", or "https://" or "chrome-extension://" origin. more information, see http://developer.chrome.com/extensions/contentsecuritypolicy.html 

my manifest looks following:

{   "name": "example inc.",   "manifest_version" : 2,   "version": "0.4.4",   "content_scripts": [     {       "matches": [         "*://*.example.cc/*"       ],       "js": [         "production/jquery.libs.min.js",         "https://example.cc/js/example.js"       ],       "run_at": "document_end"     }   ],   "permissions": [     "*://*.example.cc/*",     "tabs",     "activetab",     "contextmenus",     "storage",     "management",     "cookies"   ],   "content_security_policy": "script-src 'self' https://ssl.google-analytics.com/ga.js https://example.cc/js/*; object-src 'self'" } 

from examples i've seen, , after reading through of csp docs, i'm not sure i'm missing. our domain https, example.js file exists , accessible, etc

any ideas welcome!

you should do:

"content_security_policy": "script-src 'self' https://ssl.google-analytics.com/ga.js https://example.cc; object-src 'self'" 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -