From 6dd5f510df6541ba845143b1d0ed5e60caf92a14 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 27 Jun 2018 12:37:55 +0200 Subject: [PATCH 1/3] 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/3] 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) => { From 45ee647bbe1601599fe869caa40ab9ad95775da9 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 17 Sep 2018 15:39:35 +0200 Subject: [PATCH 3/3] add cloudflare-ipfs.com https://www.cloudflare.com/distributed-web-gateway/ --- gateways.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gateways.json b/gateways.json index 632d753..d184c4f 100644 --- a/gateways.json +++ b/gateways.json @@ -16,5 +16,6 @@ "https://ipfs.wa.hle.rs/ipfs/:hash", "https://api.wisdom.sh/ipfs/:hash", "https://gateway.blocksec.com/ipfs/:hash", - "https://ipfs.renehsz.com/ipfs/:hash" -] \ No newline at end of file + "https://ipfs.renehsz.com/ipfs/:hash", + "https://cloudflare-ipfs.com/ipfs/:hash" +]