diff --git a/LICENSE-WSL b/LICENSE-WSL index fbdd300..e3f452b 100644 --- a/LICENSE-WSL +++ b/LICENSE-WSL @@ -99,7 +99,7 @@ WJQserver Studio 开源许可证 * 8.3 版本更新: 授权方可能会发布本许可证的修订版本或新版本。您可以选择是继续使用本许可证的旧版本还是选择适用新版本。 WJQserver Studio Open Source License -Version v2.0 +Version v2.1 Copyright © WJQserver Studio 2024 diff --git a/VERSION b/VERSION index 3c8ff8c..80d13b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.1 \ No newline at end of file +3.5.2 \ No newline at end of file diff --git a/api/api.go b/api/api.go index e8ca10f..597a198 100644 --- a/api/api.go +++ b/api/api.go @@ -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", })) } diff --git a/main.go b/main.go index a441752..e2e898b 100644 --- a/main.go +++ b/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)