mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
fix blob rewrite
This commit is contained in:
parent
0008366e07
commit
cf5ae0d184
1 changed files with 2 additions and 2 deletions
|
|
@ -68,8 +68,8 @@ func NoRouteHandler(cfg *config.Config, limiter *rate.RateLimiter, iplimiter *ra
|
||||||
|
|
||||||
// 处理blob/raw路径
|
// 处理blob/raw路径
|
||||||
if matcher == "blob" {
|
if matcher == "blob" {
|
||||||
rawPath = rawPath[10:]
|
rawPath = rawPath[18:]
|
||||||
rawPath = "raw.githubusercontent.com" + rawPath
|
rawPath = "https://raw.githubusercontent.com" + rawPath
|
||||||
rawPath = strings.Replace(rawPath, "/blob/", "/", 1)
|
rawPath = strings.Replace(rawPath, "/blob/", "/", 1)
|
||||||
matcher = "raw"
|
matcher = "raw"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue