1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

do things when not dev

This commit is contained in:
Kyle Spearrin
2017-07-14 13:29:52 -04:00
parent 25fccfc3fd
commit 64212a1874
3 changed files with 7 additions and 7 deletions

View File

@ -15,7 +15,7 @@ namespace Bit.Core.Utilities
GlobalSettings globalSettings,
Func<LogEvent, bool> filter = null)
{
if(env.IsProduction())
if(!env.IsDevelopment())
{
if(filter == null)
{

View File

@ -132,14 +132,14 @@ namespace Bit.Core.Utilities
services.AddTransient<ICorsPolicyService, AllowAllCorsPolicyService>();
if(env.IsProduction())
if(env.IsDevelopment())
{
var identityServerCert = CoreHelpers.GetCertificate(globalSettings.IdentityServer.CertificateThumbprint);
identityServerBuilder.AddSigningCredential(identityServerCert);
identityServerBuilder.AddTemporarySigningCredential();
}
else
{
identityServerBuilder.AddTemporarySigningCredential();
var identityServerCert = CoreHelpers.GetCertificate(globalSettings.IdentityServer.CertificateThumbprint);
identityServerBuilder.AddSigningCredential(identityServerCert);
}
services.AddScoped<IResourceOwnerPasswordValidator, ResourceOwnerPasswordValidator>();
@ -152,7 +152,7 @@ namespace Bit.Core.Utilities
public static void AddCustomDataProtectionServices(
this IServiceCollection services, IHostingEnvironment env, GlobalSettings globalSettings)
{
if(env.IsProduction())
if(!env.IsDevelopment())
{
var dataProtectionCert = CoreHelpers.GetCertificate(globalSettings.DataProtection.CertificateThumbprint);
var storageAccount = CloudStorageAccount.Parse(globalSettings.Storage.ConnectionString);