mirror of
https://github.com/bitwarden/server.git
synced 2025-07-09 11:54:41 -05:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@ -19,13 +19,13 @@ namespace Bit.Identity
|
||||
logging.AddSerilog(hostingContext, e =>
|
||||
{
|
||||
var context = e.Properties["SourceContext"].ToString();
|
||||
if(context.Contains(typeof(IpRateLimitMiddleware).FullName) &&
|
||||
if (context.Contains(typeof(IpRateLimitMiddleware).FullName) &&
|
||||
e.Level == LogEventLevel.Information)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(context.Contains("IdentityServer4.Validation.TokenValidator") ||
|
||||
if (context.Contains("IdentityServer4.Validation.TokenValidator") ||
|
||||
context.Contains("IdentityServer4.Validation.TokenRequestValidator"))
|
||||
{
|
||||
return e.Level > LogEventLevel.Error;
|
||||
|
@ -31,7 +31,7 @@ namespace Bit.Identity
|
||||
|
||||
// Settings
|
||||
var globalSettings = services.AddGlobalSettingsServices(Configuration);
|
||||
if(!globalSettings.SelfHosted)
|
||||
if (!globalSettings.SelfHosted)
|
||||
{
|
||||
services.Configure<IpRateLimitOptions>(Configuration.GetSection("IpRateLimitOptions"));
|
||||
services.Configure<IpRateLimitPolicies>(Configuration.GetSection("IpRateLimitPolicies"));
|
||||
@ -49,7 +49,7 @@ namespace Bit.Identity
|
||||
// Caching
|
||||
services.AddMemoryCache();
|
||||
|
||||
if(!globalSettings.SelfHosted)
|
||||
if (!globalSettings.SelfHosted)
|
||||
{
|
||||
// Rate limiting
|
||||
services.AddSingleton<IIpPolicyStore, MemoryCacheIpPolicyStore>();
|
||||
@ -66,7 +66,7 @@ namespace Bit.Identity
|
||||
services.AddBaseServices();
|
||||
services.AddDefaultServices(globalSettings);
|
||||
|
||||
if(CoreHelpers.SettingHasValue(globalSettings.ServiceBus.ConnectionString) &&
|
||||
if (CoreHelpers.SettingHasValue(globalSettings.ServiceBus.ConnectionString) &&
|
||||
CoreHelpers.SettingHasValue(globalSettings.ServiceBus.ApplicationCacheTopicName))
|
||||
{
|
||||
services.AddHostedService<Core.HostedServices.ApplicationCacheHostedService>();
|
||||
@ -85,7 +85,7 @@ namespace Bit.Identity
|
||||
// Default Middleware
|
||||
app.UseDefaultMiddleware(env, globalSettings);
|
||||
|
||||
if(!globalSettings.SelfHosted)
|
||||
if (!globalSettings.SelfHosted)
|
||||
{
|
||||
// Rate limiting
|
||||
app.UseMiddleware<CustomIpRateLimitMiddleware>();
|
||||
|
Reference in New Issue
Block a user