From c0b355e24a6a47d63f20b384fc57b19b5f3811d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Tue, 16 Jan 2024 08:37:36 +0200 Subject: [PATCH] fix: pass configured slog to oidc server (#7229) --- internal/api/oidc/op.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/internal/api/oidc/op.go b/internal/api/oidc/op.go index 272f2a285a..fd523f6be3 100644 --- a/internal/api/oidc/op.go +++ b/internal/api/oidc/op.go @@ -139,16 +139,18 @@ func NewServer( assetAPIPrefix: assets.AssetAPI(externalSecure), } metricTypes := []metrics.MetricType{metrics.MetricTypeRequestCount, metrics.MetricTypeStatusCode, metrics.MetricTypeTotalCount} - server.Handler = op.RegisterLegacyServer(server, op.WithHTTPMiddleware( - middleware.MetricsHandler(metricTypes), - middleware.TelemetryHandler(), - middleware.NoCacheInterceptor().Handler, - instanceHandler, - userAgentCookie, - http_utils.CopyHeadersToContext, - accessHandler.HandleIgnorePathPrefixes(ignoredQuotaLimitEndpoint(config.CustomEndpoints)), - middleware.ActivityHandler, - )) + server.Handler = op.RegisterLegacyServer(server, + op.WithFallbackLogger(fallbackLogger), + op.WithHTTPMiddleware( + middleware.MetricsHandler(metricTypes), + middleware.TelemetryHandler(), + middleware.NoCacheInterceptor().Handler, + instanceHandler, + userAgentCookie, + http_utils.CopyHeadersToContext, + accessHandler.HandleIgnorePathPrefixes(ignoredQuotaLimitEndpoint(config.CustomEndpoints)), + middleware.ActivityHandler, + )) return server, nil }