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

Request handling simplified

This commit is contained in:
nobody42
2020-03-28 19:19:18 +01:00
parent cde9e09c19
commit 5797358a89

View File

@@ -42,13 +42,6 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
tabDomain = Address.EXAMPLE;
}
if (requestDetails.type === WebRequestType.XHR) {
if (tabDomain !== interceptor.xhrTestDomain) {
return interceptor._handleMissingCandidate(requestDetails.url);
}
}
if (interceptor.taintedDomains[tabDomain] || (/yandex\./).test(tabDomain) ||
(/wickedlocal\.com/).test(tabDomain)) {
@@ -58,11 +51,7 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
targetDetails = requestAnalyzer.getLocalTarget(requestDetails);
targetPath = targetDetails.path;
if (!targetPath) {
return interceptor._handleMissingCandidate(requestDetails.url);
}
if (!files.active[targetPath]) {
if (!targetDetails) {
return interceptor._handleMissingCandidate(requestDetails.url);
}