Firefox WebExtensions和跨域权限 [英] Firefox WebExtensions and Cross-domain privileges
问题描述
我试图使用相对较新的 WebExtensions 我总是收到以下错误: -Origin请求被阻止: 我添加了网站,我想访问manifest.json里面的权限部分,就像在网站上解释的那样,并且在Google Chrome浏览器上也是如此。 正常情况下,它应该这样工作,至少在 https://developer.mozilla.org/zh-CN/Add-ons/WebExtensions/Content_scripts#Cross-domain_privileges
$ b
同源策略不允许读取....处的远程资源(原因:缺少CORS头'Access-Control-Allow-Origin')
$ b $我会的非常感谢任何帮助,因为我的想法。
manifest.json
{
...
权限:[
< all_urls>
]
}
I am trying to port a chrome extension to firefox using the relatively new WebExtensions from Firefox.
I always getting the following error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at .... (Reason: CORS header 'Access-Control-Allow-Origin' missing)
I added the website i would like to access to the permissions section inside the manifest.json like explained on the website, and also on Google Chrome its working.
Normally it should work that way, at least its explained that way on https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Content_scripts#Cross-domain_privileges
I would be very thankful for any help since I am out of ideas.
manifest.json
{
...
"permissions": [
"<all_urls>"
]
}
这篇关于Firefox WebExtensions和跨域权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!