-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
type: bugA bug in the functionality of IoniconsA bug in the functionality of Ionicons
Description
It looks like the icons are loaded with fetch via data: schema
https://github.com/ionic-team/ionicons/blob/main/src/components/icon/request.ts#L13
With Content Security Policy headers enabled, the connect-src directive will block the icons from loading, unless if we also allow data: source.
However, this is not a safe practice. https://security.stackexchange.com/questions/94993/is-including-the-data-scheme-in-your-content-security-policy-safe
Refused to connect to 'data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Calendar</title><rect stroke-linejoin='round' x='48' y='80' width='416' height='384' rx='48' class='ionicon-fill-none ionicon-stroke-width'/><circle cx='296' cy='232' r='24'/><circle cx='376' cy='232' r='24'/><circle cx='296' cy='312' r='24'/><circle cx='376' cy='312' r='24'/><circle cx='136' cy='312' r='24'/><circle cx='216' cy='312' r='24'/><circle cx='136' cy='392' r='24'/><circle cx='216' cy='392' r='24'/><circle cx='296' cy='392' r='24'/><path stroke-linejoin='round' stroke-linecap='round' d='M128 48v32M384 48v32' class='ionicon-fill-none ionicon-stroke-width'/><path stroke-linejoin='round' d='M464 160H48' class='ionicon-fill-none ionicon-stroke-width'/></svg>' because it violates the following Content Security Policy directive: "connect-src 'self' *.example.com".
I am curious, why is fetch used to load local resources?
ahmadnassri and jskrepnek
Metadata
Metadata
Assignees
Labels
type: bugA bug in the functionality of IoniconsA bug in the functionality of Ionicons