From 94e352c81d1d7948c41f5eabf3a32aa1072e21bc Mon Sep 17 00:00:00 2001 From: ploosh Date: Thu, 5 Dec 2024 10:16:42 -0500 Subject: [PATCH] fix getproxyurl for urls without a prefix --- src/components/ProxyRegistrar.astro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index 832c171..a77ceaa 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -28,6 +28,7 @@ const preference = Alu.store.get("proxy").value; let url = input.value.trim(); if (!isUrl(url)) url = getSearchEngine() + url; + else if (!(url.startsWith("https://") || url.startsWith("http://"))) url = "http://" + url; if (preference === "ultraviolet") { return window.__uv$config.prefix + window.__uv$config.encodeUrl(url); } else if (preference == "rammerhead") {