]> Untitled Git - lemmy-ui.git/commitdiff
User HTTP instead of HTTPS when fetching icon in docker internal network
authorabias <abias1122@gmail.com>
Mon, 22 May 2023 22:10:16 +0000 (18:10 -0400)
committerabias <abias1122@gmail.com>
Mon, 22 May 2023 22:10:16 +0000 (18:10 -0400)
src/server/index.tsx

index 05988cf76c7d03287059f6f143b5f646ecdf2fc9..19deb9c414958c442e9854ec6223d7d496a778e9 100644 (file)
@@ -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());