Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

feat: support Content Security Policy w/o need for unsafe-inline styles #4155

Closed
oliversalzburg opened this issue Aug 14, 2015 · 7 comments
Closed
Labels
needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community type: feature

Comments

@oliversalzburg
Copy link
Contributor

We don't allow unsafe-eval or unsafe-inline in our Content Security Policy. This causes angular-material to not work and many errors being logged in the JS console when attempting to use it.

We're already using ngCsp, but it has no noticeable effect on the issue.

@ThomasBurleson
Copy link
Contributor

Please post this in the Angular Material Forum

@oliversalzburg
Copy link
Contributor Author

@oliversalzburg
Copy link
Contributor Author

Might have been solved in part by #7959

@oliversalzburg
Copy link
Contributor Author

@stu-co
Copy link

stu-co commented Jun 25, 2018

@oliversalzburg setNonce(); did not work for me - did you find a solution to this?

@oliversalzburg
Copy link
Contributor Author

@stu-co Sadly, no. It was put on our backlog and priority to solve it is very low.

@Splaktar
Copy link
Member

You can use https://github.com/angular/material-tools to do custom builds of the CSS. There are some docs on creating static themes here. I haven't tried it with the latest version of AngularJS Material, please open issues in that repo if you run into problems.

I'm not sure that this will solve the CSP issues with unsafe inline styles, but it's worth taking a look at.

@Splaktar Splaktar changed the title How can I use this with CSP? feat: support Content Security Policy w/o need for unsafe-inline styles Jun 26, 2018
@Splaktar Splaktar added the needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community label Jun 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community type: feature
Projects
None yet
Development

No branches or pull requests

4 participants