Skip to content

Feature Request Install as App Middleware / nuget package  #32

@TehWardy

Description

@TehWardy

I've been trying to get this working with my own CMS.
The trouble I've hit is that my CMS handles all paths for a given set of domains.
So when I add the extension in to my app my app is handling the URL's that should go to the extension and of course not favorably.
If this could be packaged up such that with a bit of config I can serve up auto renewals from my own app code that would be cool.

Is something like this possible?

var domains = new string [] 
{
    "x.com",
    "y.com",
    "z.com"
};

var config = new ConfigurationBuilder()
    .SetBasePath(Directory.GetCurrentDirectory())
    .AddJsonFile("appsettings.json")
    .Build();

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddLetsEncrypt(letsEnc=> {
       config.GetSection("LetsEncrypt").Bind(letsEnc);
});

var app = builder.Build();
app.Run();
app.AutoRenewCerts(domains, oneCertPerDomain: true);

This as I see it could be done in a such a way that we don't need external applications or services.
It also means that the Lets Encrypt endpoints become part of the app API (solves my problem).

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions