From a10070b9c773a8ca7d206fc600df28d6e9a64c0a Mon Sep 17 00:00:00 2001 From: ThompsonNye Date: Sun, 21 Sep 2025 10:50:08 +0200 Subject: [PATCH] Add seq api key support --- .../Common/DependencyInjectionExtensions.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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;