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