Meteor mrgalaxy: lane package not loading content security policy

I try to use a strip with a meteor to create a client, and then charge the client, and I added mrgalaxy: stripe. I follow this guide: http://themeteorchef.com/recipes/building-a-saas-with-meteor-stripe-part-1/ . After starting the meteor, I get the following errors:

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

Is there a workaround with manifest.json? If so, where should it be located, how will it look and how to read it?

+4
source share
2 answers

I was able to fix this by changing app / server / startup.js:

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

To:

Meteor.startup( () => {
  BrowserPolicy.content.allowOriginForAll("https://js.stripe.com/")
  BrowserPolicy.content.allowOriginForAll("https://checkout.stripe.com/")
})

:

+3

AFAIK, mrgalaxy:stripe . copleykj:stripe-sync .

0

All Articles