1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-06-05 21:49:31 +02:00

Extract Domain from URL (#1137)

This commit is contained in:
nobody
2022-09-19 06:20:22 +02:00
parent c5a519a733
commit 703438ce0b

View File

@@ -34,7 +34,10 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
let validCandidate, targetDetails, targetDomain, isGoogleFont, isGoogleMaterialIcons, initiatorDomain, isListed; let validCandidate, targetDetails, targetDomain, isGoogleFont, isGoogleMaterialIcons, initiatorDomain, isListed;
if (requestDetails['type'] === WebRequestType.MAIN_FRAME && if (requestDetails['type'] === WebRequestType.MAIN_FRAME &&
helpers.checkAllowlisted(tab.url, requestAnalyzer.allowlistedDomains)) { helpers.checkAllowlisted(
helpers.extractDomainFromUrl(tab.url, true),
requestAnalyzer.allowlistedDomains
)) {
return { return {
'cancel': false 'cancel': false
}; };