Skip to content

Commit

Permalink
0.3.4 (#386)
Browse files Browse the repository at this point in the history
* 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 (王豫) <[email protected]>
  • Loading branch information
LinkLeong and tigerinus authored Jul 22, 2022
1 parent 6f98995 commit cf6103a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions middleware/gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: LinkLeong [email protected]
* @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
Expand All @@ -13,6 +13,7 @@ package middleware
import (
"fmt"
"net/http"
"strings"

"github.com/IceWhaleTech/CasaOS/pkg/utils/loger"
"github.com/gin-gonic/gin"
Expand Down Expand Up @@ -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()
}

}
}

0 comments on commit cf6103a

Please sign in to comment.