-
Notifications
You must be signed in to change notification settings - Fork 12k
Support for CSP Compliant Production Builds #1279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Closed as issue was made obsolete by #1455. |
@filipesilva Could this be re-opened? I still cannot figure out a way to make the Angular CLI work with CSP. There are many places where |
@saulshanabrook can you make a new issue for the problem you are experiencing? The description on this one is not applicable anymore. |
@filipesilva OK, opened #6872 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This is really more of a feature request.
1. OS?
Mac OS // El Capitan
2. ng version?
3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
ng build
andng build -prod
both produce anindex.html
that has inline JavaScript:This makes applications built using
ng build -prod
incompatible with CSPs that disable unsafe content sources (e.g.unsafe-inline
andunsafe-eval
), having to enable these unsafe sources negates the security benefits of having a CSP.Removing these inline scripts significantly increases the complexity of the builds (afaik) since there is no support for user-defined tasks, nor an easy way to use
systemjs
's bundler which is capable of creating CSP-compatible builds.4. The log given by the failure. Normally this include a stack trace and some
N/A
5. Mention any other details that might be useful.
The desired behavior here is for
angular-cli
production builds to support CSP and increase application security by default.The text was updated successfully, but these errors were encountered: