From c0446055aa1d5d13a1ed0ffcb0bcf377ebde4d72 Mon Sep 17 00:00:00 2001 From: Mankin <16741164+M4nk1n@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:00:03 +0800 Subject: [PATCH] Update index.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 兼容 raw/gist 链接添加 https 前缀 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f28106e..ef8f308 100644 --- a/index.js +++ b/index.js @@ -129,7 +129,7 @@ function httpHandler(req, pathname) { if (!flag) { return new Response("blocked", {status: 403}) } - if (urlStr.startsWith('github')) { + if (urlStr.startsWith('github') || urlStr.startsWith('raw.github') || urlStr.startsWith('gist.github')) { urlStr = 'https://' + urlStr } const urlObj = newUrl(urlStr)