mirror of https://github.com/hunshcn/gh-proxy
parent
c0446055aa
commit
24f4bf2719
2
index.js
2
index.js
|
@ -129,7 +129,7 @@ function httpHandler(req, pathname) {
|
|||
if (!flag) {
|
||||
return new Response("blocked", {status: 403})
|
||||
}
|
||||
if (urlStr.startsWith('github') || urlStr.startsWith('raw.github') || urlStr.startsWith('gist.github')) {
|
||||
if (urlStr.search(/^https?:\/\//) !== 0) {
|
||||
urlStr = 'https://' + urlStr
|
||||
}
|
||||
const urlObj = newUrl(urlStr)
|
||||
|
|
Loading…
Reference in New Issue