appsettings is now shared through the 'Secrets' project.

secrets are now expected inside a appsettings.secrets.json inside the 'Secrets' project.
This commit is contained in:
2021-05-19 19:41:03 +02:00
parent e7de64d04c
commit dd651629cb
17 changed files with 31 additions and 77 deletions

View File

@@ -18,4 +18,8 @@
<PackageReference Include="Winista.MimeDetect" Version="1.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Secrets\Secrets.csproj" />
</ItemGroup>
</Project>

View File

@@ -20,6 +20,7 @@ namespace FarmmapsApi
{
IConfiguration config = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", false, true)
.AddJsonFile("appsettings.secrets.json", false, true)
.Build();
var configuration = config.Get<Configuration>();