From 044af5b7ef8404fb67b29a8a83c78031ac3a4840 Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Fri, 3 Jan 2025 12:47:27 +0100 Subject: [PATCH] logging middleware --- cmd/start/start.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/start/start.go b/cmd/start/start.go index c2ea997ec7..5fb0c67037 100644 --- a/cmd/start/start.go +++ b/cmd/start/start.go @@ -370,7 +370,10 @@ func startAPIs( } oidcPrefixes := []string{"/.well-known/openid-configuration", "/oidc/v1", "/oauth/v2"} // always set the origin in the context if available in the http headers, no matter for what protocol - router.Use(middleware.WithOrigin(config.ExternalSecure, config.HTTP1HostHeader, config.HTTP2HostHeader, config.InstanceHostHeaders, config.PublicHostHeaders)) + router.Use( + logging.Middleware(), + middleware.WithOrigin(config.ExternalSecure, config.HTTP1HostHeader, config.HTTP2HostHeader, config.InstanceHostHeaders, config.PublicHostHeaders), + ) systemTokenVerifier, err := internal_authz.StartSystemTokenVerifierFromConfig(http_util.BuildHTTP(config.ExternalDomain, config.ExternalPort, config.ExternalSecure), config.SystemAPIUsers) if err != nil { return nil, err