admin管理员组文章数量:1243198
I was wondering if anyone knew of a possible way to activate Subresource Integrety with Angular-Cli. According to the following link: GitHub Pull Request It would be a feature (or a future feature). I was hoping to activate it but it does not seem to be active on the current versions. Is there another way to use Subresource Integrety with Angular-Cli?
I was wondering if anyone knew of a possible way to activate Subresource Integrety with Angular-Cli. According to the following link: GitHub Pull Request It would be a feature (or a future feature). I was hoping to activate it but it does not seem to be active on the current versions. Is there another way to use Subresource Integrety with Angular-Cli?
Share Improve this question edited Jul 20, 2017 at 8:30 Alex L asked Jul 17, 2017 at 6:47 Alex LAlex L 1191 silver badge11 bronze badges2 Answers
Reset to default 12Pass the --subresource-integrity
flag into your ng build mand.
You can verify that it works by looking at your index.html file. You'll see the integrity attribute on linked stylesheets and scripts.
SRI requires v1.5.0+ of the CLI.
E.G. ng build --subresource-integrity
Now we can simply add "subresourceIntegrity": true
in production
configurations
in angular.json
file
本文标签: javascriptSubresource Integrity With AngularCliStack Overflow
版权声明:本文标题:javascript - Subresource Integrity With Angular-Cli - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740111359a2226269.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论