natemcmaster / LettuceEncrypt

Free, automatic HTTPS certificate generation for ASP.NET Core web apps
https://nuget.org/packages/LettuceEncrypt
Apache License 2.0
1.55k stars 152 forks source link

feature: add dns-01 validation option #283

Closed klowdo closed 1 year ago

klowdo commented 1 year ago

Hi!

Added dns-01 validation. im using this i Azure container apps to add certs with the container app env as certificate source. Very new to this so happy for all feedback.

and in order to get this working behind a reverse proxy im adding this and binding the dns with cert in other code

var lettuceKesterConfig =  builder.Services.FirstOrDefault(
                x => x.ServiceType.FullName == "LettuceEncrypt.Internal.KestrelOptionsSetup");
if (lettuceKesterConfig != null)
    builder.Services.Remove(lettuceKesterConfig);
natemcmaster commented 1 year ago

This looks great @klowdo ! Thanks so much for sending this PR. This has been a long-time requested feature for this project.

I'm going to merge your code, but make 2 tweaks after I do. I'm going to move all public interfaces and types out of the LettuceEncrypt.Internal.* namespace.

Really nice work though! Thanks for the contribution 👍🏻