在我的background.js脚本中,我使用XMLHttpRequest()对象向Node服务器(当前托管在localhost上)发出普通AJAX GET请求。Node服务器使用npm包express来处理GET请求。但是,background.js只返回以下错误: Access to XMLHttpRequest at 'localhost:80' from origin 'chrome-extension:/
我读到了有关跨域ajax请求的内容,并且理解了底层的安全问题。在我的例子中,有两台服务器在本地运行,并且喜欢在测试期间启用跨域请求。localhost:8080 - Google Appengine dev server当页面从节点服务器加载时,我向localhost:8080 - GAE server发出了一个ajax</e
icon.png", },
"activeTab",
"https://ajax.googleapis.com1429560015318' because it violates the following Content Security Policy directive: "script-src '