diff --git a/KeyVault.Acmebot/Internal/DnsProvidersExtensions.cs b/KeyVault.Acmebot/Internal/DnsProvidersExtensions.cs index 8d242e84..e4cdc2a7 100644 --- a/KeyVault.Acmebot/Internal/DnsProvidersExtensions.cs +++ b/KeyVault.Acmebot/Internal/DnsProvidersExtensions.cs @@ -16,11 +16,11 @@ public static async Task> ListAllZonesAsync(this IEnumera return zones.SelectMany(x => x).ToArray(); } - public static void TryAdd(this IList dnsProviders, object options, Func factory) + public static void TryAdd(this IList dnsProviders, TOption options, Func factory) { if (options is not null) { - dnsProviders.Add(factory()); + dnsProviders.Add(factory(options)); } } } diff --git a/KeyVault.Acmebot/Startup.cs b/KeyVault.Acmebot/Startup.cs index 3ed2b3a4..04301ca6 100644 --- a/KeyVault.Acmebot/Startup.cs +++ b/KeyVault.Acmebot/Startup.cs @@ -78,15 +78,15 @@ public override void Configure(IFunctionsHostBuilder builder) var dnsProviders = new List(); - dnsProviders.TryAdd(options.AzureDns, () => new AzureDnsProvider(options.AzureDns, environment)); - dnsProviders.TryAdd(options.Cloudflare, () => new CloudflareProvider(options.Cloudflare)); - dnsProviders.TryAdd(options.CustomDns, () => new CustomDnsProvider(options.CustomDns)); - dnsProviders.TryAdd(options.DnsMadeEasy, () => new DnsMadeEasyProvider(options.DnsMadeEasy)); - dnsProviders.TryAdd(options.Gandi, () => new GandiProvider(options.Gandi)); - dnsProviders.TryAdd(options.GoDaddy, () => new GoDaddyProvider(options.GoDaddy)); - dnsProviders.TryAdd(options.GoogleDns, () => new GoogleDnsProvider(options.GoogleDns)); - dnsProviders.TryAdd(options.Route53, () => new Route53Provider(options.Route53)); - dnsProviders.TryAdd(options.TransIp, () => new TransIpProvider(options, options.TransIp, environment)); + dnsProviders.TryAdd(options.AzureDns, o => new AzureDnsProvider(o, environment)); + dnsProviders.TryAdd(options.Cloudflare, o => new CloudflareProvider(o)); + dnsProviders.TryAdd(options.CustomDns, o => new CustomDnsProvider(o)); + dnsProviders.TryAdd(options.DnsMadeEasy, o => new DnsMadeEasyProvider(o)); + dnsProviders.TryAdd(options.Gandi, o => new GandiProvider(o)); + dnsProviders.TryAdd(options.GoDaddy, o => new GoDaddyProvider(o)); + dnsProviders.TryAdd(options.GoogleDns, o => new GoogleDnsProvider(o)); + dnsProviders.TryAdd(options.Route53, o => new Route53Provider(o)); + dnsProviders.TryAdd(options.TransIp, o => new TransIpProvider(options, o, environment)); if (dnsProviders.Count == 0) { diff --git a/KeyVault.Acmebot/wwwroot/index.html b/KeyVault.Acmebot/wwwroot/index.html new file mode 100644 index 00000000..914aedc9 --- /dev/null +++ b/KeyVault.Acmebot/wwwroot/index.html @@ -0,0 +1,8 @@ + + + + + + + +