From 60aa5d140770f57e6480a5357c12f14f07c81e8b Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 16 Oct 2020 15:40:49 +0200 Subject: [PATCH] fix: default to https when recovering .eth (#847) --- add-on/src/lib/ipfs-request.js | 1 + 1 file changed, 1 insertion(+) diff --git a/add-on/src/lib/ipfs-request.js b/add-on/src/lib/ipfs-request.js index e04748c45..66021f62e 100644 --- a/add-on/src/lib/ipfs-request.js +++ b/add-on/src/lib/ipfs-request.js @@ -366,6 +366,7 @@ function createRequestModifier (getState, dnslinkResolver, ipfsPathValidator, ru if (isRecoverableViaEthDNS(request, state)) { const url = new URL(request.url) url.hostname = `${url.hostname}.link` + url.protocol = 'https:' // force HTTPS, as HSTS may be missing on initial load const redirectUrl = url.toString() log(`onErrorOccurred: attempting to recover from DNS error (${request.error}) using EthDNS for ${request.url} → ${redirectUrl}`, request) return updateTabWithURL(request, redirectUrl, browser)