mirror of
https://github.com/bitwarden/server
synced 2025-12-25 12:43:14 +00:00
update to net core 2.2
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Bit.Core.Utilities;
|
||||
using Serilog.Events;
|
||||
using AspNetCoreRateLimit;
|
||||
|
||||
namespace Bit.Identity
|
||||
{
|
||||
@@ -10,6 +13,23 @@ namespace Bit.Identity
|
||||
WebHost
|
||||
.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>()
|
||||
.ConfigureLogging((hostingContext, logging) =>
|
||||
logging.AddSerilog(hostingContext, e =>
|
||||
{
|
||||
var context = e.Properties["SourceContext"].ToString();
|
||||
if(context.Contains(typeof(IpRateLimitMiddleware).FullName) && e.Level == LogEventLevel.Information)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(context.Contains("IdentityServer4.Validation.TokenValidator") ||
|
||||
context.Contains("IdentityServer4.Validation.TokenRequestValidator"))
|
||||
{
|
||||
return e.Level > LogEventLevel.Error;
|
||||
}
|
||||
|
||||
return e.Level >= LogEventLevel.Error;
|
||||
}))
|
||||
.Build()
|
||||
.Run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user