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