简体   繁体   中英

block eval() in CSP header Angular 8 project

Can I block the eval function in CSP-Header for a Angular project (when I don't use it directly) or a there any side effects which would lead to errors when the project is deployed?

Thanks

If you set the default-src or script-src directives eval will be blocked unless you allow it with 'unsafe-eval'. If eval, setTimeout, setInterval or new Function is being called in any script it will be blocked. If you are concerned that something may break run Content-Security-Policy-Report-Only for a while and check the reports that are sent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM