Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stripe checkout css content policy error

I'm trying to create a form of Stripe Checkout inside my Ionic App. i've created a Directive that plant the form into my content view, but when i run it, the css fails on content policy violation:

checkout.js:2Refused to load the stylesheet 'https://checkout.stripe.com/v3/checkout/button-qpwW2WfkB0oGWVWIASjIOQ.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". append @ checkout.js:2Button.append @ checkout.js:2(anonymous function) @ checkout.js:2Button.load @ checkout.js:2(anonymous function) @ checkout.js:2(anonymous function) @ checkout.js:2

no matter what i define in my meta tag of content policy, it's just not working what do i do wrong?

  <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src * 'self' 'unsafe-inline' localhost:* https://bnc.lt https://api.branch.io amazonaws.com amazonaws.com.cn checkout.stripe.com 'unsafe-eval';">
like image 383
Ofershap Avatar asked Feb 18 '16 18:02

Ofershap


1 Answers

Your style-src allows for self and unsafe-inline it should also allow for https://checkout.stripe.com

like image 60
Matthew Arkin Avatar answered Nov 17 '22 21:11

Matthew Arkin