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

@ -48,9 +48,13 @@ func RoutingHandler(cfg *config.Config, limiter *rate.RateLimiter, iplimiter *ra
return
}
// 处理blob/raw路径
// 处理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"
}
// 为rawpath加入https:// 头