feature/add-seq-api-key-support #8
@@ -34,7 +34,14 @@ public static class DependencyInjectionExtensions
|
|||||||
string? seqHost = builder.Configuration.GetConnectionString("seq");
|
string? seqHost = builder.Configuration.GetConnectionString("seq");
|
||||||
if (!string.IsNullOrEmpty(seqHost))
|
if (!string.IsNullOrEmpty(seqHost))
|
||||||
{
|
{
|
||||||
builder.AddSeqEndpoint("seq");
|
builder.AddSeqEndpoint("seq", o =>
|
||||||
|
{
|
||||||
|
var apiKey = builder.Configuration.GetValue<string>("seq-api-key");
|
||||||
|
if (!string.IsNullOrEmpty(apiKey))
|
||||||
|
{
|
||||||
|
o.ApiKey = apiKey;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
|
|||||||
Reference in New Issue
Block a user