Skip to content

Instantly share code, notes, and snippets.

@Maarten88
Created March 16, 2017 14:44
Show Gist options
  • Save Maarten88/d3956bcd770c700298a4ec5d3a2675ff to your computer and use it in GitHub Desktop.
Save Maarten88/d3956bcd770c700298a4ec5d3a2675ff to your computer and use it in GitHub Desktop.
.UseKestrel(async options => {
if (secureUrls.Any())
{
var certificateManager = options.ApplicationServices.GetService<ICertificateManager>();
var certificate = await certificateManager.GetCertificate(httpsDomains);
if (certificate != null)
options.UseHttps(certificate);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment