From e960ca6fdbda6a57db0e32fe521ec7fcedefa584 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 20 Sep 2021 07:56:22 +0200 Subject: [PATCH] Handle null in ConfigureKestrelServerOptions.cs --- .../Security/ConfigureKestrelServerOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs b/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs index 2483981b7f..c11e0d8814 100644 --- a/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs +++ b/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs @@ -12,7 +12,7 @@ namespace Umbraco.Cms.Web.Common.Security public void Configure(KestrelServerOptions options) { // convert from KB to bytes - options.Limits.MaxRequestBodySize = _runtimeSettings.Value.MaxRequestLength * 1024; + options.Limits.MaxRequestBodySize = _runtimeSettings.Value.MaxRequestLength.HasValue ? _runtimeSettings.Value.MaxRequestLength.Value * 1024 : long.MaxValue; } } }