mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
Compare commits
2 commits
5b05588375
...
b86e58cddf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b86e58cddf | ||
|
|
44673b9a3f |
5 changed files with 21 additions and 2 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# 更新日志
|
||||
|
||||
3.5.2 - 2025-06-11
|
||||
---
|
||||
- CHANGE: 加入MPL 2.0许可证, 项目转为双重许可
|
||||
|
||||
3.5.1 - 2025-06-09
|
||||
---
|
||||
- CHANGE: 大幅优化`Matcher`的性能, 实现零分配, 大幅提升性能; 单次操作时间: `254.3 ns/op` => `29.59 ns/op`
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ WJQserver Studio 开源许可证
|
|||
* 8.3 版本更新: 授权方可能会发布本许可证的修订版本或新版本。您可以选择是继续使用本许可证的旧版本还是选择适用新版本。
|
||||
|
||||
WJQserver Studio Open Source License
|
||||
Version v2.0
|
||||
Version v2.1
|
||||
|
||||
Copyright © WJQserver Studio 2024
|
||||
|
||||
|
|
|
|||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
3.5.1
|
||||
3.5.2
|
||||
|
|
@ -92,6 +92,8 @@ func HealthcheckHandler(c *app.RequestContext, ctx context.Context) {
|
|||
c.Response.Header.Set("Content-Type", "application/json")
|
||||
c.JSON(200, (map[string]interface{}{
|
||||
"Status": "OK",
|
||||
"Repo": "WJQSERVER-STUDIO/GHProxy",
|
||||
"Author": "WJQSERVER-STUDIO",
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
@ -99,6 +101,8 @@ func VersionHandler(c *app.RequestContext, ctx context.Context, version string)
|
|||
c.Response.Header.Set("Content-Type", "application/json")
|
||||
c.JSON(200, (map[string]interface{}{
|
||||
"Version": version,
|
||||
"Repo": "WJQSERVER-STUDIO/GHProxy",
|
||||
"Author": "WJQSERVER-STUDIO",
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
|||
11
main.go
11
main.go
|
|
@ -402,6 +402,16 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
var viaString string = "WJQSERVER-STUDIO/GHProxy"
|
||||
|
||||
func viaHeader() app.HandlerFunc {
|
||||
return func(ctx context.Context, c *app.RequestContext) {
|
||||
protoVersion := "1.1"
|
||||
c.Header("Via", protoVersion+" "+viaString)
|
||||
c.Next(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
if showVersion || showHelp {
|
||||
return
|
||||
|
|
@ -450,6 +460,7 @@ func main() {
|
|||
|
||||
r.Use(recovery.Recovery()) // Recovery中间件
|
||||
r.Use(loggin.Middleware()) // log中间件
|
||||
r.Use(viaHeader())
|
||||
setupApi(cfg, r, version)
|
||||
setupPages(cfg, r)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue