This commit is contained in:
wjqserver 2025-06-14 07:16:43 +08:00
parent bd8412f157
commit 41395b1d72
5 changed files with 29 additions and 12 deletions

View file

@ -68,7 +68,10 @@ func NoRouteHandler(cfg *config.Config, limiter *rate.RateLimiter, iplimiter *ra
// 处理blob/raw路径
if matcher == "blob" {
rawPath = strings.Replace(rawPath, "/blob/", "/raw/", 1)
rawPath = rawPath[10:]
rawPath = "raw.githubusercontent.com" + rawPath
rawPath = strings.Replace(rawPath, "/blob/", "/", 1)
matcher = "raw"
}
logDebug("Matched: %v", matcher)