-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(icon): icons will load when content security policies are enabled #1141
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
Conversation
@@ -22,6 +22,14 @@ export const config: Config = { | |||
src: './components/test/*.svg', | |||
dest: './assets/', | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was to allow the local dev server to have more than the single index.html
test template. Is there another way to accomplish this or is this the recommended path?
If Liam can create a pre-release build, that would be awesome. I'm confident in these changes as they relate to the |
Validated that this fixes the reported bug: Framework dev-build: Back button icon loads on the dev-build without an error. We have other CSP violations in some of our styles that I've reported in the JIRA task. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Background
When content security policies (CSP) are enabled, the usage of
<ion-icon icon={icon}>
fails to load, due to the url being adata:
uri.e.g.:
With a CSP of:
What's new
DOMParser
, allowing the asset to safely load<ion-icon icon={icon}>
will render when a CSP is enabled.