1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 09:32:48 -05:00

amazon sqs block ip queuing

This commit is contained in:
Kyle Spearrin
2019-03-18 16:23:37 -04:00
parent 7d65f8fa76
commit 8427c23b5e
7 changed files with 262 additions and 67 deletions

View File

@ -77,7 +77,14 @@ namespace Bit.Admin
services.AddHostedService<Jobs.JobsHostedService>();
if(!globalSettings.SelfHosted)
{
services.AddHostedService<HostedServices.BlockIpHostedService>();
if(CoreHelpers.SettingHasValue(globalSettings.Storage.ConnectionString))
{
services.AddHostedService<HostedServices.AzureQueueBlockIpHostedService>();
}
else if(CoreHelpers.SettingHasValue(globalSettings.Amazon?.AccessKeySecret))
{
services.AddHostedService<HostedServices.AmazonSqsBlockIpHostedService>();
}
}
}