Add PKI tables (#117)

This commit is contained in:
Leendert de Borst
2024-07-29 11:18:38 +02:00
parent 7fd2b9d678
commit 2016117d47
16 changed files with 1255 additions and 9 deletions

View File

@@ -16,6 +16,20 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.Configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
builder.Configuration.AddJsonFile($"appsettings.{builder.HostEnvironment.Environment}.json", optional: true, reloadOnChange: true);
var config = new Config();
builder.Configuration.Bind(config);
if (string.IsNullOrEmpty(config.ApiUrl))
{
throw new KeyNotFoundException("ApiUrl is not set in the configuration.");
}
if (config.SmtpAllowedDomains == null || config.SmtpAllowedDomains.Count == 0)
{
throw new KeyNotFoundException("SmtpAllowedDomains is not set in the configuration.");
}
builder.Services.AddSingleton(config);
builder.Services.AddLogging(logging =>
{
if (builder.HostEnvironment.IsDevelopment())