Skip to content

Commit

Permalink
RHINENG-11685: debug only gin context request header
Browse files Browse the repository at this point in the history
Unable to read entry, failed to marshal fields to JSON, json: unsupported type: func() (io.ReadCloser, error)Failed to fire hook: failed to marshal fields to JSON, json: unsupported type: func() (io.ReadCloser, error)
  • Loading branch information
psegedy committed Aug 20, 2024
1 parent 739eede commit 0d17ef6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manager/middlewares/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func isAccessGranted(c *gin.Context) bool {
utils.LogDebug("response_headers", res.Header, "request_headers", res.Request.Header, "isAccessGranted rbac")
}
if c.Request != nil {
utils.LogDebug("gin_context_req", *c.Request, "isAccessGranted rbac")
utils.LogDebug("gin_context_req_header", c.Request.Header, "isAccessGranted rbac")
}
if res != nil && res.Body != nil {
defer res.Body.Close()
Expand Down Expand Up @@ -202,7 +202,7 @@ func RBAC() gin.HandlerFunc {
return
}
if c.Request != nil {
utils.LogDebug("context_req", c.Request, "RBAC")
utils.LogDebug("context_req_header", c.Request.Header, "RBAC")
}
c.AbortWithStatusJSON(http.StatusUnauthorized,
utils.ErrorResponse{Error: "You don't have access to this application"})
Expand Down

0 comments on commit 0d17ef6

Please sign in to comment.