fix: pass configured slog to oidc server (#7229)

This commit is contained in:
Tim Möhlmann 2024-01-16 08:37:36 +02:00 committed by GitHub
parent 0a65e20507
commit c0b355e24a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}