mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
25w16a
This commit is contained in:
parent
d26f6d1e1b
commit
a18660121a
18 changed files with 638 additions and 118 deletions
|
|
@ -37,6 +37,7 @@ func NoRouteHandler(cfg *config.Config, limiter *rate.RateLimiter, iplimiter *ra
|
|||
}
|
||||
}
|
||||
|
||||
//rawPath := strings.TrimPrefix(c.Request.URL.Path, "/") // 去掉前缀/
|
||||
rawPath := strings.TrimPrefix(c.Request.URL.RequestURI(), "/") // 去掉前缀/
|
||||
re := regexp.MustCompile(`^(http:|https:)?/?/?(.*)`) // 匹配http://或https://开头的路径
|
||||
matches := re.FindStringSubmatch(rawPath) // 匹配路径
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue