Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Browser refuses to execute inline script

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!