Open esporysz opened 4 months ago
@esporysz Hello, Can you please provide more information how to reproduce this issue?
Hello,
"@angular/core": "^17.2.0",
"@fundamental-ngx/cdk": "^0.50.1-rc.0",
"@fundamental-ngx/core": "^0.50.1-rc.0",
"@fundamental-ngx/i18n": "^0.50.1-rc.0",
"@sap-theming/theming-base-content": "^11.9.0",
"fundamental-styles": "^0.37.0",
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'" />
@esporysz I can't reproduce the issue on the latest version of Fundamental NGX. Here are the steps I followed:
No warnings appeared in the console.
Did you run application in prod mode?
@esporysz Yes.
Created prod build and then run it with http-server
and not getting any warnings
Hi, @khotcholava Could you show the browser's source of your application? I mean not the source code that the application is built on but the resulting source on the browser side when you click "View Page Source" in your browser. The element may exist on your page but the browser does not report it because some reason.
@khotcholava, is it possible that you've missed @esporysz's step 2? I mean, did you actually set up a CSP? Just asking because you haven't mentioned it in your comments.
Is this a bug, enhancement, or feature request?
BUG
Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)
If this is a bug, please provide steps for reproducing it; the exact components you are using;
When applying following Content-Security-Policy
'Content-Security-Policy' "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self';
we get following error in the Chrome 126.0.6478.127 console: Refused to execute inline event handler because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), 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. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback. which is caused byIs it possible to move code above to the file to avoid error message in the console?