Handle null in ConfigureKestrelServerOptions.cs

This commit is contained in:
Bjarke Berg
2021-09-20 07:56:22 +02:00
parent c7fcb4abaa
commit e960ca6fdb

View File

@@ -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;
}
}
}