From 1cf3deff4fedbffbcd74d6f1fd3b9c4fd468e6d5 Mon Sep 17 00:00:00 2001 From: christophedemey Date: Sun, 9 Feb 2020 14:24:05 +0100 Subject: [PATCH] Update README.md (#34) I was missing this to get it working. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d92dba6..b74ea1c 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,18 @@ public void Configure() } ``` +## Set default bindings +Call UseUrls with http://* and https://* in Program.cs +```csharp + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseUrls(new string[] { "http://*", "https://*" }); + webBuilder.UseStartup(); + }); +``` + Tada! Your application now supports SSL via LetsEncrypt, even from the first HTTPS request. It will even renew your certificate automatically in the background. # Optional: Configuring persistence