diff --git a/src/Icons/Services/IconFetchingService.cs b/src/Icons/Services/IconFetchingService.cs index ed1cc0cb3..c23407903 100644 --- a/src/Icons/Services/IconFetchingService.cs +++ b/src/Icons/Services/IconFetchingService.cs @@ -17,6 +17,8 @@ namespace Bit.Icons.Services { private readonly HashSet _iconRels = new HashSet { "icon", "apple-touch-icon", "shortcut icon" }; + private readonly HashSet _blacklistedRels = + new HashSet { "preload", "image_src", "preconnect", "canonical", "alternate", "stylesheet" }; private readonly HashSet _iconExtensions = new HashSet { ".ico", ".png", ".jpg", ".jpeg" }; @@ -155,7 +157,7 @@ namespace Bit.Icons.Services { icons.Add(new IconResult(hrefAttr.Value, sizesAttr?.Value)); } - else + else if(relAttr == null || !_blacklistedRels.Contains(relAttr.Value.ToLower())) { try {