mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
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.
This commit is contained in:
parent
543207b5af
commit
a2082bae5c
@ -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…
Reference in New Issue
Block a user