Javascript Meteor mrgalaxy:条带包未加载内容安全策略

Javascript Meteor mrgalaxy:条带包未加载内容安全策略,javascript,meteor,stripe-payments,content-security-policy,Javascript,Meteor,Stripe Payments,Content Security Policy,我尝试使用stripe和meteor创建一个客户,然后向客户收费,我添加了mrgalaxy:stripe。我将遵循以下教程:。启动meteor后,我得到以下错误: Refused to load the script 'https://js.stripe.com/v2/' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'". Refuse

我尝试使用stripe和meteor创建一个客户,然后向客户收费,我添加了mrgalaxy:stripe。我将遵循以下教程:。启动meteor后,我得到以下错误:

Refused to load the script 'https://js.stripe.com/v2/' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".

Refused to load the script 'https://checkout.stripe.com/checkout.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'".

Uncaught ReferenceError: Stripe is not defined

是否有manifest.json的变通方法?如果是的话,它应该放在哪里,它应该是什么样子,我该如何读入它

AFAIK,
mrgalaxy:stripe
不再受积极支持。试试看。

我可以通过将app/server/startup.js从以下位置更改来解决此问题:

Meteor.startup( () => Modules.server.startup() );
致:

提出此解决方案的有用参考资料包括:


您当前的浏览器策略是如何配置的(或者您是否使用默认策略)?我根据教程要求添加了此软件包。嘿,Elijah,谢谢您的回答!这是正确的答案/解决方案。注意:我正在另一个项目中使用Meteor 1.2.1的浏览器策略包,我必须将“Meteor.startup(()=>{”更改为“Meteor.startup(function(){”以修复“SyntaxError:Unexpected token)”。这可能是因为我没有允许使用上述语法的包。
Meteor.startup( () => {
  BrowserPolicy.content.allowOriginForAll("https://js.stripe.com/")
  BrowserPolicy.content.allowOriginForAll("https://checkout.stripe.com/")
})