简体   繁体   中英

Data URIs in CSS not working with an Endpoint Security solution

I am using Semantic UI and some of the icon fonts are stated by a Data URI. For example:

@font-face { 
    font-family: 'Dropdown'; 
    src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAA...) format('woff'); 
}

We have an issue with such Data URIs when using Internet Explorer 11 and an Endpoint Security solution. All icon fonts which are stated by a Data URI seemed to be blocked.

Fact is, that the Endpoint Security solution does not allow creation of *.tmp files in *\\Users\\*\\AppData\\Local\\Temp and somehow these Base64-encoded Data URI seems to be stored in these files. When deactivating the rule, the icons were shown. However, it's not an option according to the sysops. The rule was introduced in order to have a better protection against Ransomware.

I hope someone has an idea how to use Semantic UI respectively Data-URLs with an Endpoint Security solution?

How can I tell IE not to create *.tmp files?

A workaround for Semantic UI can be found here:

By the way: We're using Angular 4, so our guess is, that the Endpoint Security solution cannot analyze the mime type of the Base64 string when the Angular application is packed/minified.

The only solutions we've found:

  1. disable access protection on files in *\\Users\\*\\AppData\\Local\\Temp
  2. implement a workaround in order to load the icons in an other way

However, we had no choice than choosing the workaround which I have added in a comment on the Semantic UI issue page .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM