CSP not working as expected with chrome v3 extension

904 views
Skip to first unread message

Mohammad Amir Hameed Attari

unread,
Apr 17, 2022, 5:05:21 PM4/17/22
to Chromium Extensions
I have this csp rules in my manifest
manifest.json
```
"content_security_policy": {
    "extension_pages": "default-src 'self' http://localhost:*; script-src 'self' http://localhost:*; script-src-elem 'self' http://localhost:*; object-src 'self' http://localhost:*;"   
  }
```

popup.html

and I get 
Refused to load the script 'http://localhost:3000/_next/static/chunks/pages/index.js?ts=1650226594407' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

wOxxOm

unread,
Apr 18, 2022, 6:07:38 AM4/18/22
to Chromium Extensions, picwellw...@gmail.com

Mohammad Amir Hameed Attari

unread,
Apr 22, 2022, 6:13:13 PM4/22/22
to Chromium Extensions, wOxxOm, Mohammad Amir Hameed Attari
I didn't understand. That page supposed to help me somehow?

wOxxOm

unread,
Apr 23, 2022, 10:12:46 AM4/23/22
to Chromium Extensions, picwellw...@gmail.com, wOxxOm
It means this is a bug.
Reply all
Reply to author
Forward
0 new messages