feat: upgrade gin and fix

This commit is contained in:
2025-09-22 17:55:11 +08:00
parent f9d8253ab9
commit 6d33dc4f4c
4 changed files with 57 additions and 13 deletions

View File

@ -9,6 +9,7 @@ package util
import (
"context"
"fmt"
"git.zhangdeman.cn/zhangdeman/consts"
"github.com/gin-gonic/gin"
@ -25,7 +26,7 @@ func GinCtxToContext(ctx *gin.Context) context.Context {
consts.GinContextField: ctx,
}
for k, v := range newGinContext.Keys {
requestData[k] = v
requestData[fmt.Sprintf("%v", k)] = v
}
if nil != ctx.Request {
requestData[consts.GinRequestURIField] = ctx.Request.RequestURI