How to remove unsafe-inline in script-src without script error in Sharepoint

Cù Minh Hiếu 0 Reputation points
2023-04-24T08:14:45.04+00:00

CSP will not allow inline scripts and styles. Hence the total site is getting collapsed. Adding "unsafe-inline" will fix the issue, but for security reasons, we are not adding "unsafe-inline". Have to fix the issue by adding "nonce" or encrypting with "Sha" values. How can we add "nonce" or "Sha" for all the scripts that are auto-generated in the SharePoint back-end or is there any way to apply unsafe-inline for Sharepoint without script block error

Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.