diff --git a/Backend/Program.cs b/Backend/Program.cs index 085af01bde..de478375c7 100644 --- a/Backend/Program.cs +++ b/Backend/Program.cs @@ -12,6 +12,14 @@ public static void Main(string[] args) public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) + .ConfigureKestrel((context, options) => + { + // Allow clients to POST large files to servers, such as project imports. + // Note: The HTTP Proxy in front, such as NGNIX, also needs to be configured + // to allow large requests through as well. + // 250MB. + options.Limits.MaxRequestBodySize = 250_000_000; + }) .UseStartup(); } } diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 14dfcaae05..1568150088 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -12,6 +12,9 @@ server { ssl_certificate_key /ssl/key.pem; charset utf-8; + # Allow clients to import large projects. + client_max_body_size 250m; + location /v1 { proxy_pass http://backend:5000; proxy_http_version 1.1;