From 6dd5f510df6541ba845143b1d0ed5e60caf92a14 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 27 Jun 2018 12:37:55 +0200 Subject: [PATCH 1/2] fix: opt-out from redirects done by browser extension Context: https://github.com/ipfs-shipyard/ipfs-companion/pull/505 --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index b6cee74..cea7eaa 100644 --- a/app.js +++ b/app.js @@ -27,7 +27,9 @@ function checkGateways (gateways) { let checked = 0 gateways.forEach((gateway) => { const gatewayAndHash = gateway.replace(':hash', hashToTest) - fetch(gatewayAndHash) + // opt-out from gateway redirects done by browser extension + const testUrl = gatewayAndHash + '#x-ipfs-no-redirect' + fetch(testUrl) .then(res => res.text()) .then((text) => { const matched = text.trim() === hashString.trim() From efd5dbfcf951e71d5b801bf444756e24b446c035 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 2 Jul 2018 12:33:44 +0200 Subject: [PATCH 2/2] fix: update redirect opt-out symbol to final version This was shipped with https://github.com/ipfs-shipyard/ipfs-companion/releases/tag/v2.4.0.10120 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index cea7eaa..4f3aa66 100644 --- a/app.js +++ b/app.js @@ -28,7 +28,7 @@ function checkGateways (gateways) { gateways.forEach((gateway) => { const gatewayAndHash = gateway.replace(':hash', hashToTest) // opt-out from gateway redirects done by browser extension - const testUrl = gatewayAndHash + '#x-ipfs-no-redirect' + const testUrl = gatewayAndHash + '#x-ipfs-companion-no-redirect' fetch(testUrl) .then(res => res.text()) .then((text) => {