a month ago
hi, I'm used QR code library in SAP my UI5 application.. it's worked for locally & deploy but in SAP Work Zone i created tile for this application...it is not working ....getting error like this "Caused by: EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src * data: blob:". plz anyone help help me.
This is most probably due to the preload bundle (Component-preload.js or library-preload.js) being generated into string which has to be eval'd at runtime. To avoid that, exclude the third party library from the bundle. See my other answer at Solved: HowTo use 3rd party lib with content-security-policy omitting eval()" - SAP Community.
If the issue still occurs even after excluding the third party lib from the bundle, follow my other Q&A How to Fix "String as JavaScript" Errors in FLP? (Async Module Loading) - Stack Overflow where I have summarized documented best practices for CSP compliance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.