aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEduardo Antuña Díez <eduadiez@gmail.com>2018-08-09 18:20:51 +0800
committerEduardo Antuña Díez <eduadiez@gmail.com>2018-08-09 18:20:51 +0800
commita2082bae5c535f6f92d7b4124785e562815d840f (patch)
tree1595cc56a26d04b6b4b9ba8345b22091ac3e0f92 /app
parent543207b5af63424c1510438af356906696f5eb66 (diff)
downloadtangerine-wallet-browser-a2082bae5c535f6f92d7b4124785e562815d840f.tar
tangerine-wallet-browser-a2082bae5c535f6f92d7b4124785e562815d840f.tar.gz
tangerine-wallet-browser-a2082bae5c535f6f92d7b4124785e562815d840f.tar.bz2
tangerine-wallet-browser-a2082bae5c535f6f92d7b4124785e562815d840f.tar.lz
tangerine-wallet-browser-a2082bae5c535f6f92d7b4124785e562815d840f.tar.xz
tangerine-wallet-browser-a2082bae5c535f6f92d7b4124785e562815d840f.tar.zst
tangerine-wallet-browser-a2082bae5c535f6f92d7b4124785e562815d840f.zip
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.
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/ipfsContent.js4
1 files changed, 2 insertions, 2 deletions
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)
},
}
}