Skip to content

Commit

Permalink
backend: Prevent OIDC errors when not in use
Browse files Browse the repository at this point in the history
This change prevents the spam of OIDC config errors in the logs when
running the latest version of Headlamp without OIDC. Instead of logging
an error when we check for the OIDC config, we simply return since we
know we are not using OIDC auth.

Fixes: #1933

Signed-off-by: Evangelos Skopelitis <[email protected]>
  • Loading branch information
skoeva authored and joaquimrocha committed Jun 27, 2024
1 parent 8355908 commit dc0d565
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions backend/cmd/headlamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -817,10 +817,7 @@ func (c *HeadlampConfig) OIDCTokenRefreshMiddleware(next http.Handler) http.Hand
// skip if cluster is not using OIDC auth
oidcAuthConfig, err := kContext.OidcConfig()
if err != nil {
logger.Log(logger.LevelError, map[string]string{"cluster": cluster},
err, "failed to get oidc config")
next.ServeHTTP(w, r)

return
}

Expand Down

0 comments on commit dc0d565

Please sign in to comment.