# added userSecret to store .. secrets
This commit is contained in:
@@ -22,9 +22,9 @@ public static class DependencyInjection
|
||||
// Replace password in the connection string with env var in local environment.
|
||||
// Prod will use the connectionString stored in the vault with password in it directly.
|
||||
var connectionString = configuration.GetConnectionString("DefaultConnection") ?? "";
|
||||
|
||||
var dbPassword = Environment.GetEnvironmentVariable("DB_PASSWORD") ?? "";
|
||||
var dbHost = Environment.GetEnvironmentVariable("DB_HOST") ?? "localhost";
|
||||
|
||||
var dbPassword = configuration["DB_PASSWORD"] ?? "";
|
||||
var dbHost = configuration["DB_HOST"] ?? "localhost";
|
||||
|
||||
if (dbHost == "localhost" && dbPassword != string.Empty)
|
||||
{
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"VaultUri": "",
|
||||
"DB_PASSWORD": "",
|
||||
"DB_HOST": ""
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
@@ -3,6 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Hutopy.Web</RootNamespace>
|
||||
<AssemblyName>Hutopy.Web</AssemblyName>
|
||||
<UserSecretsId>de6d03c4-8b1c-49e2-a8ca-c38cd4dc7d85</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user