From: abias Date: Mon, 22 May 2023 22:10:16 +0000 (-0400) Subject: User HTTP instead of HTTPS when fetching icon in docker internal network X-Git-Url: http://these/git/%7B%60/feeds/%7B%60%24%7BarchiveUrl%7D/?a=commitdiff_plain;h=498de660bac1bffe15fef74a898c6d669794196a;p=lemmy-ui.git User HTTP instead of HTTPS when fetching icon in docker internal network --- diff --git a/src/server/index.tsx b/src/server/index.tsx index 05988cf..19deb9c 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -356,7 +356,9 @@ export async function generateManifestBase64(site: Site) { async function fetchIconPng(iconUrl: string) { return await fetch( - iconUrl.replace(/https?:\/\/localhost:\d+/g, getHttpBaseInternal()) + iconUrl + .replace(/https?:\/\/localhost:\d+/g, getHttpBaseInternal()) + .replace(/https/, "http") ) .then(res => res.blob()) .then(blob => blob.arrayBuffer());