From dd564c0df55142a3daa70dd667f7601da495d64c Mon Sep 17 00:00:00 2001 From: Evangelos Skopelitis Date: Thu, 13 Jun 2024 23:03:06 -0400 Subject: [PATCH] backend: Prevent OIDC errors when not in use 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. Signed-off-by: Evangelos Skopelitis --- backend/cmd/headlamp.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/cmd/headlamp.go b/backend/cmd/headlamp.go index 0b2d876a4ea..33ed1fb944b 100644 --- a/backend/cmd/headlamp.go +++ b/backend/cmd/headlamp.go @@ -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 }