textarea icon indicating copy to clipboard operation
textarea copied to clipboard

Content-Security-Policy is not supported

Open pavelarnost opened this issue 4 years ago • 0 comments

Ant Design support CSP via nonce in "csp" attribute of ConfigProvider. Textarea component uses inline style so nonce is not used and browser reports:

calculateNodeHeight.js:69 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-XXX'". Either the 'unsafe-inline' keyword, a hash ('sha256-+BQ4uy1Q8X6iksX2devUeYbbkg8ukCMGJSKXKhgEg9o='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.

One possible solution would be use of

pavelarnost avatar Jan 19 '22 08:01 pavelarnost