判断 github 链接不为 http(s):// 开头时自动补充 https 前缀
@ -129,7 +129,7 @@ function httpHandler(req, pathname) {
if (!flag) {
return new Response("blocked", {status: 403})
}
if (urlStr.startsWith('github')) {
if (urlStr.search(/^https?:\/\//) !== 0) {
urlStr = 'https://' + urlStr
const urlObj = newUrl(urlStr)