Chrome App Manifest不允许我的网址

时间:2013-10-31 17:25:05

标签: google-chrome google-chrome-app chrome-web-store

我的清单有以下权限行:

"permissions": ["https://api.vineapp.com/*", "storage", "webRequest", "http://platform.vine.co/*", "background","*://davine.co/*", "notifications"]

我已开始将我的应用上传并发布到Chrome网上应用店,但它又返回了以下错误,

An error occurred: Failed to process your item.

The field permissions.https://api.vineapp.com/* is not allowed in manifest.
The field permissions.http://platform.vine.co/* is not allowed in manifest.
The field permissions.*://davine.co/* is not allowed in manifest.

但Chrome应用文档中明确指出,您计划制作ajax / xhr请求的任何域都应在清单上的权限中声明。我尝试将它们从我的清单中删除并再次上传,但是我收到了大量的CORS错误,我的应用程序不允许发出请求。

2 个答案:

答案 0 :(得分:2)

我没有尝试使用通配符,但它应该可以删除尾随的星号,正如文档中所述:Referencing External Resources

此外,协议中带有通配符的网址也不会是犹太人,请尝试这样:

"permissions": ["https://api.vineapp.com/", "storage", "webRequest",
"http://platform.vine.co/", "background","http://davine.co/", "https://davine.co/",
"notifications"]

并在列表中添加除http或https以外的任何内容。

答案 1 :(得分:0)

您是否尝试过使用这种模式的通配符?

"permissions": ["https://api.vineapp.com*", "storage", "webRequest",
      "http://platform.vine.co*", "background","*://davine.co*", "notifications"]