feat(middleware): add HTTP statistics middleware

This commit is contained in:
CaIon
2025-06-10 19:29:32 +08:00
parent 896e1d978f
commit 2509f644bc
3 changed files with 49 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import (
func SetRelayRouter(router *gin.Engine) {
router.Use(middleware.CORS())
router.Use(middleware.DecompressRequestMiddleware())
router.Use(middleware.StatsMiddleware())
// https://platform.openai.com/docs/api-reference/introduction
modelsRouter := router.Group("/v1/models")
modelsRouter.Use(middleware.TokenAuth())