1

当我尝试连接到 StackOverflow API 以获取数据时出现以下错误:拒绝加载脚本

http://api.stackoverflow.com/1.1/questions/unanswered?pagesize=24&tagged=java%20sql&jsonp=jQuery1506144814109429717_1352283176238&_=1352283176259

因为它违反了以下内容安全策略指令:"script-src 'self' 'unsafe-eval'".

这是我的清单文件:

{
  "manifest_version": 2,
  "background" : { "page": "background.html"},
  "browser_action": {
    "default_icon": "images/16.png",
    "default_popup": "popup.html",
    "default_title": "Test"
  },
  "content_security_policy": "script-src 'self' 'unsafe-eval'; connect-src 'self' http://stackoverflow.com/ http://api.stackoverflow.com/; object-src 'self'",
  "content_scripts": [ {
    "all_frames": true,
    "js": [ "javascripts/settings.js" ],
    "matches": [ "http://*/*", "https://*/*", "ftp://*/*" ],
    "run_at": "document_start"
  } ],
  "description": "test api.",
  "icons": {
    "128": "images/128.png",
    "16": "images/16.png",
    "48": "images/48.png"
  },
  "options_page": "options.html",
  "minimum_chrome_version": "9",
  "name": "Test Test",
  "permissions": [
    "tabs",
    "contextMenus",
    "storage",
    "webRequest",
    "*://*.stackoverflow.com/*",
    "*://stackoverflow.com/*"
  ],
  "version": "1.1"
}

我没有任何内联脚本。

知道我在这里缺少什么吗?

4

0 回答 0