From c4b688c34f2628f2af3be6a86abd3e42646e9d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Wed, 9 Mar 2022 13:31:51 +0000 Subject: [PATCH] alt-fetch: comment fix --- plugins/alt-fetch.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/alt-fetch.js b/plugins/alt-fetch.js index 05f2881..4056eca 100644 --- a/plugins/alt-fetch.js +++ b/plugins/alt-fetch.js @@ -64,8 +64,9 @@ */ let fetchContentFromAlternativeEndpoints = (url, init={}) => { - // we're going to try a random endpoint and building an URL of the form: - // https://// + // remove the https://original.domain/ bit to get the relative path + // TODO: this assumes that URLs we handle are always relative to the root + // TODO: of the original domain, this needs to be documented var path = url.replace(/https?:\/\/[^/]+\//, '') // we really want to make fetch happen, Regina!