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

262
Views
Using CSP with nonce on React script tag

I have a content security header containing a randomly generated nonce on each request.

All scripts within the html document have a nonce attribute with correct associated value.

All seems to be working ok except for a script loaded from within compiled React script

The problem: The bundled React js file is blocked by CSP and not loaded by the browser even if I add a nonce to the script tag.

I use these CSP directives: Content-Security-Policy: script-src 'strict-dynamic' 'nonce-{0}' 'unsafe-eval' unsafe-inline

This is how the script tag looks like. @nonce is replaced at the runtime.

<script nonce='@nonce' src='{someUrl}/app.js' defer> </script>
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!