I'm running vue3 app using vite.
I want to add this script <script src="https://js.stripe.com/v3"></script> to my index.html; in order to handle payments with Stripe.
But I face these error in console:
VM262:5 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-GEy81O1cBXMUtzNmiNgydJFrTMOlLkoqKvaHpNDLcrA='), or a nonce ('nonce-...') is required to enable inline execution.
I did some couple of researches and with the help of official documentation; find out that we need to add meta tag that allows this action:
<meta
http-equiv="Content-Security-Policy"
content="connect-src 'self' https://api.stripe.com ws://127.0.0.1:3000; frame-src 'self' https://js.stripe.com https://hooks.stripe.com; script-src 'self' https://js.stripe.com 'unsafe-inline'"
/>
But nothing changes...
First of all, why CSP is enabled in my project (Because I didn't see same problem in Stripe videos in Youtube) and then how can I fix that?
Thanks