Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
crlssn committed Nov 18, 2024
1 parent 0f851f6 commit 28debfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/backend/rpc/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
connectcors "connectrpc.com/cors"
"github.com/rs/cors"
"go.uber.org/fx"
"go.uber.org/zap"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"

Expand Down Expand Up @@ -132,6 +133,8 @@ func CookieMiddleware(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
cookie, err := r.Cookie("refreshToken")
if err == nil {
zap.L().Info("refresh token found in cookie", zap.String("refresh_token", cookie.Value))
println("refresh token found in cookie", cookie.Value)

Check failure on line 137 in apps/backend/rpc/module.go

View workflow job for this annotation

GitHub Actions / backend

use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
ctx := context.WithValue(r.Context(), jwt.ContextKeyRefreshToken, cookie.Value)
r = r.WithContext(ctx)
}
Expand Down

0 comments on commit 28debfd

Please sign in to comment.