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

168
Views
google extension is not accepting script-src exceptions in V3

from what I've researched here in the community, adding the code below to manifest.json should at least allow exceptions for scripts in the whitelist, but it seems like it's no longer allowed to use injected, except if the scripts are added by src tag. Could someone help me confirm because I can't find anything in the documentation (or I didn't look it right in the API)

manifest.json:

...
,"content_security_policy": {
    "extension_pages": "default-src 'self'; script-src 'self' https://example.com;",
    "sandbox": "sandbox default-src 'self';"
  }
...
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

I just posted and found the answer right after... as I didn't find anything on the forum, I'll leave it there in case anyone has doubts:

... MV3 disallows certain CSP modifications for extension_pages that were permitted in MV2. The script-src, object-src, and worker-src directives may only have the following values:

self none Any localhost source, (http://localhost, http://127.0.0.1, or any port on those domains) CSP modifications for sandbox have no such new restrictions. ...

https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#content-security-policy

Therefore, just by an injection like:

const node = document.createElement('script');
node.src = chrome.runtime.getURL('./script.js');
node.onload = function(){ this.remove() };
(document.head || document.documentElement).appendChild(node);
about 4 years ago · Santiago Gelvez 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!