From abaf381a091c22dce916b55829ee07bbf153fd99 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Tue, 31 Aug 2021 17:03:51 +0300 Subject: [PATCH] Files: increase limits --- products/ASC.Files/Server/Program.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Server/Program.cs b/products/ASC.Files/Server/Program.cs index a113b31af3..302baa18db 100644 --- a/products/ASC.Files/Server/Program.cs +++ b/products/ASC.Files/Server/Program.cs @@ -24,7 +24,7 @@ namespace ASC.Files await host.RunAsync(); } - public static IHostBuilder CreateHostBuilder(string[] args) => + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .UseSystemd() .UseWindowsService() @@ -35,6 +35,11 @@ namespace ASC.Files builder.ConfigureKestrel((hostingContext, serverOptions) => { + serverOptions.Limits.MaxRequestBodySize = 100 * 1024 * 1024; + serverOptions.Limits.MaxRequestBufferSize = 100 * 1024 * 1024; + serverOptions.Limits.MinRequestBodyDataRate = null; + serverOptions.Limits.MinResponseDataRate = null; + var kestrelConfig = hostingContext.Configuration.GetSection("Kestrel"); if (!kestrelConfig.Exists()) return;