mirror of
https://github.com/bitwarden/server
synced 2025-12-15 15:53:59 +00:00
upgrade to aspnet core 3.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace Bit.Admin
|
||||
@@ -9,14 +9,16 @@ namespace Bit.Admin
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
WebHost
|
||||
Host
|
||||
.CreateDefaultBuilder(args)
|
||||
.ConfigureKestrel(o =>
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
o.Limits.MaxRequestLineSize = 20_000;
|
||||
})
|
||||
.UseStartup<Startup>()
|
||||
.ConfigureLogging((hostingContext, logging) =>
|
||||
webBuilder.ConfigureKestrel(o =>
|
||||
{
|
||||
o.Limits.MaxRequestLineSize = 20_000;
|
||||
});
|
||||
webBuilder.UseStartup<Startup>();
|
||||
webBuilder.ConfigureLogging((hostingContext, logging) =>
|
||||
logging.AddSerilog(hostingContext, e =>
|
||||
{
|
||||
var context = e.Properties["SourceContext"].ToString();
|
||||
@@ -27,7 +29,8 @@ namespace Bit.Admin
|
||||
return false;
|
||||
}
|
||||
return e.Level >= LogEventLevel.Error;
|
||||
}))
|
||||
}));
|
||||
})
|
||||
.Build()
|
||||
.Run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user