mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
2.1.0 (#47)
2.1.0 --- - RELEASE: v2.1.0正式版发布; - CHANGE: 加入`FreeBSD`与`Darwin`系统支持 - CHANGE: 更新安全政策, v1和24w版本序列生命周期正式结束 - ADD: 加入`timing`中间件记录响应时间 - ADD: 加入`loggin`中间件包装日志输出 - CHANGE: 更新logger版本至v1.3.0 - CHANGE: 改进日志相关 - ADD: 加入日志等级配置项
This commit is contained in:
parent
f5c32915b9
commit
09163ed4df
26 changed files with 296 additions and 44 deletions
|
|
@ -18,7 +18,7 @@ var (
|
|||
// 提取用户名和仓库名
|
||||
func MatchUserRepo(rawPath string, cfg *config.Config, c *gin.Context, matches []string) (string, string) {
|
||||
if gistMatches := gistRegex.FindStringSubmatch(rawPath); len(gistMatches) == 3 {
|
||||
logInfo("%s %s %s %s %s Matched-Username: %s", c.ClientIP(), c.Request.Method, rawPath, c.Request.Header.Get("User-Agent"), c.Request.Proto, gistMatches[1])
|
||||
LogDump("%s %s %s %s %s Matched-Username: %s", c.ClientIP(), c.Request.Method, rawPath, c.Request.Header.Get("User-Agent"), c.Request.Proto, gistMatches[1])
|
||||
return gistMatches[1], ""
|
||||
}
|
||||
// 定义路径
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue