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.
feature/default_network_editable
Eduardo Antuña Díez 6 years ago
parent 543207b5af
commit a2082bae5c
  1. 4
      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)
},
}
}

Loading…
Cancel
Save