diff --git a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs index 33acf4f..143a210 100644 --- a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs +++ b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs @@ -34,7 +34,14 @@ public static class DependencyInjectionExtensions string? seqHost = builder.Configuration.GetConnectionString("seq"); if (!string.IsNullOrEmpty(seqHost)) { - builder.AddSeqEndpoint("seq"); + builder.AddSeqEndpoint("seq", o => + { + var apiKey = builder.Configuration.GetValue("seq-api-key"); + if (!string.IsNullOrEmpty(apiKey)) + { + o.ApiKey = apiKey; + } + }); } return builder;