|
|
@ -69,7 +69,7 @@ async function fetchHandler(e) { |
|
|
|
const exp2 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/(?:blob)\/.*$/i |
|
|
|
const exp2 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/(?:blob)\/.*$/i |
|
|
|
const exp3 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/(?:info|git-upload-pack).*$/i |
|
|
|
const exp3 = /^(?:https?:\/\/)?github\.com\/.+?\/.+?\/(?:info|git-upload-pack).*$/i |
|
|
|
const exp4 = /^(?:https?:\/\/)?raw\.githubusercontent\.com\/.+?\/.+?\/.+?\/.+$/i |
|
|
|
const exp4 = /^(?:https?:\/\/)?raw\.githubusercontent\.com\/.+?\/.+?\/.+?\/.+$/i |
|
|
|
if (path.search(exp1) === 0 || !Config.cnpmjs && (path.search(exp3) === 0 || path.search(exp4))) { |
|
|
|
if (path.search(exp1) === 0 || !Config.cnpmjs && (path.search(exp3) === 0 || path.search(exp4) === 0)) { |
|
|
|
return httpHandler(req, path) |
|
|
|
return httpHandler(req, path) |
|
|
|
} else if (path.search(exp2) === 0) { |
|
|
|
} else if (path.search(exp2) === 0) { |
|
|
|
if (Config.jsdelivr){ |
|
|
|
if (Config.jsdelivr){ |
|
|
|