Skip to content

Commit

Permalink
fix: default to https when recovering .eth (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Oct 16, 2020
1 parent 63bc106 commit 60aa5d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions add-on/src/lib/ipfs-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 60aa5d1

Please sign in to comment.