Skip to content

Commit

Permalink
Merge pull request #9 from go-cinch/piupuer/dev
Browse files Browse the repository at this point in the history
[fix]more log
  • Loading branch information
piupuer authored Oct 1, 2024
2 parents 4c1f31a + 920f841 commit 74c570a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/server/middleware/whitelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"auth/api/auth"
"auth/internal/biz"
"github.com/go-cinch/common/log"
"github.com/go-kratos/kratos/v2/middleware"
"github.com/go-kratos/kratos/v2/middleware/selector"
"github.com/go-kratos/kratos/v2/transport"
Expand Down Expand Up @@ -59,6 +60,7 @@ func hasPermissionWhitelist(ctx context.Context, whitelist *biz.WhitelistUseCase
if req.Resource != nil {
r.Resource = *req.Resource
}
log.WithContext(ctx).Info("method: %s, uri: %s, resource: %s", r.Method, r.URI, r.Resource)
// skip options
if r.Method == http.MethodOptions {
ok = true
Expand Down

0 comments on commit 74c570a

Please sign in to comment.