-
Couldn't load subscription status.
- Fork 11.9k
Closed
Labels
featureIssue that requests a new featureIssue that requests a new feature
Description
Versions
Angular CLI: 1.6.0
Node: 8.9.0
OS: darwin x64
Angular: 5.0.0
... compiler, compiler-cli, core, service-worker
Repro steps
- Make sure your app has assets, e.g. images of size less than 10Kb referenced from your css
- run ng build --target=production
Observed behavior
Assets, e.g. images of size less than 10kb are inlined in CSS
Desired behavior
When building an Angular app with Angular CLI, resources in CSS, e.g. svg images, less than 10kb in size will be inlined.
This sounds like a good concept from the performance point of view, however, it violates very strict Content Security Policies in my app, which I 'm not allowed to change.
data: Allows data: URIs to be used as a content source. This is insecure; an attacker can also inject arbitrary data: URIs. Use this sparingly and definitely not for scripts.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src
I want an option to NOT to inline any assets, e.g. images, in CSS due to strict CSP requirements.
Mention any other details that might be useful (optional)
RoopeHakulinen, djhojd, flibbertigibbet, intellix, degramj and 6 more
Metadata
Metadata
Assignees
Labels
featureIssue that requests a new featureIssue that requests a new feature