简体   繁体   English

在Internet Explorer上为Angular应用程序实施内容安全策略

[英]Implement Content Security Policy For Angular Application On Internet Explorer

We are working on implementation of CSP(Content Security Policy) requirement in our application. 我们正在努力在应用程序中实施CSP(内容安全策略)要求。 We have set the CSP setting through the index.html using the meta tag : 我们使用meta标记通过index.html设置了CSP设置:

  <meta http-equiv="Content-Security-Policy" content="
  script-src 'self' 'unsafe-inline' 'unsafe-eval'" />

which works fine in Chrome & Firefox. 在Chrome和Firefox中可以正常运行。 However, we need to implement this for Internet Explorer also. 但是,我们也需要针对Internet Explorer实施此操作。

IE doesn't support CSP. IE不支持CSP。 At most you can use the X-Content-Security-Policy for IE 10 and newer. 最多可以为IE 10和更高版本使用X-Content-Security-Policy But this only supports the sandbox directive. 但这仅支持sandbox指令。 Edge though should support most of what you need. Edge应该支持您的大部分需求。

Additional info on caniuse 犬的附加信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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