From cf6103a2b53cc62526d6b04c55ba78c43b63fcec Mon Sep 17 00:00:00 2001 From: link Date: Fri, 22 Jul 2022 11:09:05 +0800 Subject: [PATCH] 0.3.4 (#386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * delete connect * update user * change branch * API feedback (#341) * wip * wip * wip * wip * wip * wip * wip * wip * change branch * update route * change branch * Update route.go * 0.3.4 Function development completed * Update system.go * update ui * Completed v0.3.4 and released alpha * Update gin.go Co-authored-by: Tiger Wang (王豫) --- middleware/gin.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/middleware/gin.go b/middleware/gin.go index 3febab2b9..d8fd836dc 100644 --- a/middleware/gin.go +++ b/middleware/gin.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2021-10-08 10:29:08 * @LastEditors: LinkLeong - * @LastEditTime: 2022-07-13 11:26:12 + * @LastEditTime: 2022-07-22 11:06:07 * @FilePath: /CasaOS/middleware/gin.go * @Description: * @Website: https://www.casaos.io @@ -13,6 +13,7 @@ package middleware import ( "fmt" "net/http" + "strings" "github.com/IceWhaleTech/CasaOS/pkg/utils/loger" "github.com/gin-gonic/gin" @@ -52,7 +53,10 @@ func Cors() gin.HandlerFunc { } func WriteLog() gin.HandlerFunc { return func(c *gin.Context) { - loger.Info("request:", zap.Any("path", c.Request.URL.String()), zap.Any("param", c.Params), zap.Any("query", c.Request.URL.Query()), zap.Any("body", c.Request.Body), zap.Any("method", c.Request.Method)) - c.Next() + if !strings.Contains(c.Request.URL.String(), "password") { + loger.Info("request:", zap.Any("path", c.Request.URL.String()), zap.Any("param", c.Params), zap.Any("query", c.Request.URL.Query()), zap.Any("method", c.Request.Method)) + c.Next() + } + } }