27 lines
701 B
C#
27 lines
701 B
C#
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
|
|
|
namespace HTTP2FileStreams;
|
|
|
|
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;
|
|
});
|
|
options.Limits.MaxRequestBodySize = null;
|
|
});
|
|
builder.Services.AddControllers();
|
|
|
|
var app = builder.Build();
|
|
app.MapControllers();
|
|
app.UseDefaultFiles();
|
|
app.UseStaticFiles();
|
|
|
|
app.Run();
|
|
}
|
|
} |