feat: added feature of http/2 chunk load
This commit is contained in:
16
Program.cs
16
Program.cs
@@ -1,3 +1,5 @@
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||
|
||||
namespace HTTP2FileStreams;
|
||||
|
||||
public class Program
|
||||
@@ -5,9 +7,19 @@ public class Program
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.WebHost.ConfigureKestrel(options =>
|
||||
{
|
||||
options.ConfigureEndpointDefaults(endpointOptions =>
|
||||
{
|
||||
endpointOptions.Protocols = HttpProtocols.Http2;
|
||||
});
|
||||
});
|
||||
builder.Services.AddControllers();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapGet("/", () => "Hello World!");
|
||||
app.MapControllers();
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user