feat: 加大了最大请求体大小

master
ArgonarioD 2023-07-06 02:57:27 +08:00
parent b800161895
commit f21281d9f9
1 changed files with 1 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Directory.CreateDirectory("./files");
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseUrls("https://*:8081"); builder.WebHost.UseUrls("https://*:8081");
builder.WebHost.UseKestrel((context, options) => { builder.WebHost.UseKestrel((context, options) => {
options.Limits.MaxRequestBodySize = 1073741824L;
options.ConfigureEndpointDefaults(listenOptions => { options.ConfigureEndpointDefaults(listenOptions => {
listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3; listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
listenOptions.UseHttps(builder.Configuration.GetSection(SslOptions.SectionName).Get<SslOptions>()! listenOptions.UseHttps(builder.Configuration.GetSection(SslOptions.SectionName).Get<SslOptions>()!