Created
September 24, 2019 06:32
-
-
Save PradeepLoganathan/2007150e71706640b5091c432f5674d4 to your computer and use it in GitHub Desktop.
Using http2 using kestrel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IWebHostBuilder CreateWebHostBuilder(string[] args) | |
{ | |
return WebHost.CreateDefaultBuilder(args) | |
.ConfigureKestrel(options => | |
{ | |
options.Listen(IPAddress.Any, 8080, listenOptions => | |
{ | |
listenOptions.Protocols = HttpProtocols.Http1AndHttp2; | |
listenOptions.UseHttps("testcertificate.pfx", "donotusepassword"); | |
}); | |
}) | |
.UseStartup<Startup>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment