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

356
Views
CSP testing locally - how can I allow for everything aside from unsafe evals

I have an error being thrown in an upper environment:

EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive:

I can't recreate this locally so I'm trying to essentially allow for all script sources, etc, and only block what are considered "unsafe evals".

I've tried a number of things with my <meta> tag in the index.html file, but everything I've tried so far ends up blocking other dependencies I need. This is just for testing purposes, I need to figure out if that error is breaking something in the upper environment (as everything is working locally). Thanks.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ok, I think I figured it out. WARNING: For testing purposes only, do not use in production

<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline'; script-src * 'unsafe-inline'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';">

This has allowed me to only get that unsafe eval error.

about 4 years ago · Juan Pablo Isaza Report
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!