diff --git a/core/constants.js b/core/constants.js index d4e94896..497c64d3 100644 --- a/core/constants.js +++ b/core/constants.js @@ -268,6 +268,11 @@ const CDNs = { 'www.gstatic.com': 'gstatic.com', }; +const IgnoredHost = { + 'fonts.googleapis.com': true, + 'www.gstatic.com': true +}; + // Supported charsets for TextDecoder() // https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoder const EncodingTypes = { diff --git a/core/request-analyzer.js b/core/request-analyzer.js index f5d399fc..898563eb 100644 --- a/core/request-analyzer.js +++ b/core/request-analyzer.js @@ -176,11 +176,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel } } - if ( - requestAnalyzer.logging && - channelHost + channelPath !== 'fonts.googleapis.com/css' && - channelHost + channelPath !== 'fonts.googleapis.com/css2' - ) { + if (requestAnalyzer.logging && !IgnoredHost[channelHost]) { console.warn('[ LocalCDN ] Missing resource: ' + channelHost + channelPath); } return false;