mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
[PM-1675] Timeout or transient error when verifying domains (#2835)
* Increased timeout of the dns resolve method and changed the lifetime of the dnsResolverService to scoped * Reverted to using singleton as this was recommneded on the docs and also registered lookup client as a singleton * Registerered a singleton service of ILookupClient * replaced unused serviceProvider with a discard
This commit is contained in:
@ -19,6 +19,7 @@ using Bit.Core.Utilities;
|
||||
using Bit.Core.Vault.Services;
|
||||
using Bit.Infrastructure.Dapper;
|
||||
using Bit.Infrastructure.EntityFramework;
|
||||
using DnsClient;
|
||||
using IdentityModel;
|
||||
using IdentityServer4.AccessTokenValidation;
|
||||
using IdentityServer4.Configuration;
|
||||
@ -176,6 +177,11 @@ public static class ServiceCollectionExtensions
|
||||
services.AddSingleton<IStripeSyncService, StripeSyncService>();
|
||||
services.AddSingleton<IMailService, HandlebarsMailService>();
|
||||
services.AddSingleton<ILicensingService, LicensingService>();
|
||||
services.AddSingleton<ILookupClient>(_ =>
|
||||
{
|
||||
var options = new LookupClientOptions { Timeout = TimeSpan.FromSeconds(15) };
|
||||
return new LookupClient(options);
|
||||
});
|
||||
services.AddSingleton<IDnsResolverService, DnsResolverService>();
|
||||
services.AddSingleton<IFeatureService, LaunchDarklyFeatureService>();
|
||||
services.AddTokenizers();
|
||||
|
Reference in New Issue
Block a user