From a2082bae5c535f6f92d7b4124785e562815d840f Mon Sep 17 00:00:00 2001 From: Eduardo Antuña Díez Date: Thu, 9 Aug 2018 12:20:51 +0200 Subject: Avoid overwriting a domain that can be resolved by DNS According to the current implementation any domain ending in .eth or .test will try to resolve through ENS even if the DNS is able to resolve it. changing `onBeforeRequest` to `onErrorOccurred` will only resolve those .eth or .test domains that the DNS is not able to resolve. --- app/scripts/lib/ipfsContent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/scripts/lib/ipfsContent.js b/app/scripts/lib/ipfsContent.js index 9e401ebcd..5db63f47d 100644 --- a/app/scripts/lib/ipfsContent.js +++ b/app/scripts/lib/ipfsContent.js @@ -34,11 +34,11 @@ module.exports = function (provider) { return { cancel: true } } - extension.webRequest.onBeforeRequest.addListener(ipfsContent, {urls: ['*://*.eth/', '*://*.test/']}) + extension.webRequest.onErrorOccurred.addListener(ipfsContent, {urls: ['*://*.eth/', '*://*.test/']}) return { remove () { - extension.webRequest.onBeforeRequest.removeListener(ipfsContent) + extension.webRequest.onErrorOccurred.removeListener(ipfsContent) }, } } -- cgit