1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-26 17:37:36 +01:00

adjust log filter for exclude security token errors

This commit is contained in:
Kyle Spearrin 2017-01-16 23:55:48 -05:00
parent c35cd49f36
commit 4c56a370a0

View File

@ -206,7 +206,7 @@ namespace Bit.Api
Func<LogEvent, bool> serilogFilter = (e) =>
{
var context = e.Properties["SourceContext"].ToString();
if(context == typeof(JwtBearerMiddleware).FullName && e.Level == LogEventLevel.Error)
if(e.Exception != null && e.Exception.GetType() == typeof(SecurityTokenValidationException) || e.Exception.Message == "Bad security stamp.")
{
return false;
}