From 11cac01f24d99b628cf5570e7c64655957492bea Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Wed, 11 Jun 2025 12:43:32 -0400 Subject: [PATCH 1/2] Version the Let's Encrypt article --- aspnetcore/fundamentals/servers/yarp/lets-encrypt.md | 1 + 1 file changed, 1 insertion(+) diff --git a/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md b/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md index 33beeb083d41..3266111cd0b9 100644 --- a/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md +++ b/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md @@ -3,6 +3,7 @@ uid: fundamentals/servers/yarp/lets-encrypt title: YARP Lets Encrypt description: YARP Lets Encrypt author: samsp-msft +monikerRange: '<= aspnetcore-8.0' ms.author: samsp ms.date: 2/6/2025 ms.topic: article From 8dad23e862b41f45eec6dfc4ca115d678b97ebf6 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 13 Jun 2025 13:29:31 -0400 Subject: [PATCH 2/2] Updates --- .../fundamentals/servers/yarp/lets-encrypt.md | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md b/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md index 3266111cd0b9..3ca777f7a7e5 100644 --- a/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md +++ b/aspnetcore/fundamentals/servers/yarp/lets-encrypt.md @@ -3,28 +3,33 @@ uid: fundamentals/servers/yarp/lets-encrypt title: YARP Lets Encrypt description: YARP Lets Encrypt author: samsp-msft -monikerRange: '<= aspnetcore-8.0' +monikerRange: '<= aspnetcore-7.0' ms.author: samsp -ms.date: 2/6/2025 +ms.date: 6/13/2025 ms.topic: article content_well_notification: AI-contribution ai-usage: ai-assisted --- - # YARP Lets Encrypt +> [!NOTE] +> The [`LettuceEncrypt` NuGet package](https://github.com/natemcmaster/LettuceEncrypt) described in this article is archived and no longer supported, so the package isn't recommended for use. + ## Introduction -YARP can support the certificate authority [Lets Encrypt](https://letsencrypt.org/) by using the API of another ASP.NET Core project [LettuceEncrypt](https://github.com/natemcmaster/LettuceEncrypt). It allows you to set up TLS between the client and YARP with minimal configuration. + +YARP can support the certificate authority [Lets Encrypt](https://letsencrypt.org/) by using the API of another ASP.NET Core project, [`LettuceEncrypt`](https://github.com/natemcmaster/LettuceEncrypt). It allows you to set up TLS between the client and YARP with minimal configuration. ## Requirements -Add the LettuceEncrypt package dependency: +Add the `LettuceEncrypt` package dependency: + ```csproj ``` ## Configuration -There are required options for LettuceEncrypt that should be set, see the example of `appsettings.json`: + +There are required options for `LettuceEncrypt` that should be set. See the example of `appsettings.json`: ```json { @@ -38,8 +43,10 @@ There are required options for LettuceEncrypt that should be set, see the exampl }, "LettuceEncrypt": { - // Set this to automatically accept the terms of service of your certificate authority. - // If you don't set this in config, you will need to press "y" whenever the application starts + // Set this to automatically accept the terms of service of your certificate + // authority. + // If you don't set this in config, you will need to press "y" whenever the + // application starts "AcceptTermsOfService": true, // You must specify at least one domain name @@ -57,16 +64,17 @@ There are required options for LettuceEncrypt that should be set, see the exampl services.AddLettuceEncrypt(); ``` -For more options (i.e. saving certificates) see examples in [LettuceEncrypt doc](https://github.com/natemcmaster/LettuceEncrypt). +For more options (for example, saving certificates) see the examples in the [`LettuceEncrypt` project README](https://github.com/natemcmaster/LettuceEncrypt). ## Kestrel Endpoints -If your project is explicitly using kestrel options to configure IP addresses, ports, or HTTPS settings, you will also need to call `UseLettuceEncrypt`. +If your project is explicitly using Kestrel options to configure IP addresses, ports, or HTTPS settings, call `UseLettuceEncrypt`: Example: ```csharp var builder = WebApplication.CreateBuilder(args); + builder.WebHost.ConfigureKestrel(kestrel => { kestrel.ListenAnyIP(443, portOptions => @@ -78,4 +86,3 @@ builder.WebHost.ConfigureKestrel(kestrel => }); }); ``` -