Content-Security-Policy he page’s settings blocked an inline style (style-src-elem)

Content-Security-Policy he page’s settings blocked an inline style (style-src-elem)

chiraggargchiraggarg Posts: 2Questions: 0Answers: 0

Hello Team

I have use button in my project and i am facing CSP error on console.
This error no have come on Google Chrome, Its come on Mozila firefox.

Content-Security-Policy: The page’s settings blocked an inline style (style-src-elem) from being applied because it violates the following directive: “style-src data: 'self' 'sha256-AYX9LcD+ZVnIyi960/84yJ022Bo0UuLwe7cK7b2YKDo=' 'sha256-WAyOw4V+FqDc35lQPyRADLBWbuNK8ahvYEaQIYF1+Ps=' 'nonce-c3LGr6m5X5SHPhNKGZb1oqzzXiy8E/361VnZjXgdTEM=' 'unsafe-inline'”

I got the solution in this file
./node_modules/datatables.net-buttons/js/buttons.print.js

So kindly check this.
Thanks

Replies

  • allanallan Posts: 64,302Questions: 1Answers: 10,618 Site admin

    Can you create an example repo showing the issue or a Stackbltiz example please? That way I'll be able to debug it and see if I can resolve the issue. It will also show me what versions you are using.

    Allan

  • chiraggargchiraggarg Posts: 2Questions: 0Answers: 0


    "datatables.net": "1.13.6",
    "datatables.net-buttons": "2.4.1",
    "datatables.net-buttons-zf": "^3.2.0",
    "datatables.net-dt": "^1.13.4",
    "datatables.net-fixedcolumns-zf": "^4.3.0",
    "datatables.net-plugins": "^1.13.6",
    "datatables.net-rowreorder-zf": "^1.4.1",
    "datatables.net-zf": "^1.13.8",

  • allanallan Posts: 64,302Questions: 1Answers: 10,618 Site admin

    DataTables 1 is no longer supported and is quite of out date with the latest changes and fixes I'm afraid. As a first stop, I'd suggest updating to the latest versions - there is a good chance the issue will already have been fixed (I've certainly committed changes in the past to address that, although without a test case, I'm not sure if it is specifically this issue).

    Allan

Sign In or Register to comment.