Skip to content

CSP error when using a third party Blazor UI Control #147

@Tony20221

Description

@Tony20221

I was trying to using a textbox from DevExpress UI control and got a CSP error.
Refused to load the script 'https://www.amazon.com/_content/DevExpress.Blazor/modules/dx-blazor-cdd27ee4.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Chrome blocked it. I am not sure why it's blocking it. First, it's part of the extension and second why Chrome is showing it's being loaded from Amazon instead of the extension. Maybe because the UI control is loading the js dynamically.

I modified the content_security_policy property in the manifest file like this by adding 'https://*'.

"content_security_policy": {
  "extension_pages": "script-src 'self' https://* 'wasm-unsafe-eval'; object-src 'self'"
},

but I am still getting the error.
Any ideas how to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions