mirror of
https://github.com/bitwarden/server.git
synced 2025-04-17 11:08:16 -05:00
make sure global settings are set
This commit is contained in:
parent
4084a01d7a
commit
57ebe0de1a
@ -344,9 +344,11 @@ namespace Bit.Core.Utilities
|
|||||||
.PersistKeysToFileSystem(new DirectoryInfo(globalSettings.DataProtection.Directory));
|
.PersistKeysToFileSystem(new DirectoryInfo(globalSettings.DataProtection.Directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!globalSettings.SelfHosted)
|
if(!globalSettings.SelfHosted && CoreHelpers.SettingHasValue(globalSettings.Storage.ConnectionString) &&
|
||||||
|
CoreHelpers.SettingHasValue(globalSettings.DataProtection.CertificateThumbprint))
|
||||||
{
|
{
|
||||||
var dataProtectionCert = CoreHelpers.GetCertificate(globalSettings.DataProtection.CertificateThumbprint);
|
var dataProtectionCert = CoreHelpers.GetCertificate(
|
||||||
|
globalSettings.DataProtection.CertificateThumbprint);
|
||||||
var storageAccount = CloudStorageAccount.Parse(globalSettings.Storage.ConnectionString);
|
var storageAccount = CloudStorageAccount.Parse(globalSettings.Storage.ConnectionString);
|
||||||
services.AddDataProtection()
|
services.AddDataProtection()
|
||||||
.PersistKeysToAzureBlobStorage(storageAccount, "aspnet-dataprotection/keys.xml")
|
.PersistKeysToAzureBlobStorage(storageAccount, "aspnet-dataprotection/keys.xml")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user