Skip to content

Commit 04599ac

Browse files
authored
Don't load configuration from user secrets
1 parent f2cae1b commit 04599ac

File tree

6 files changed

+0
-36
lines changed

6 files changed

+0
-36
lines changed

Applications/AdminApi/src/AdminApi/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ static void LoadConfiguration(WebApplicationBuilder webApplicationBuilder, strin
142142
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: false)
143143
.AddJsonFile("appsettings.override.json", optional: true, reloadOnChange: true);
144144

145-
if (env.IsDevelopment())
146-
{
147-
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
148-
webApplicationBuilder.Configuration.AddUserSecrets(appAssembly, optional: true);
149-
}
150-
151145
webApplicationBuilder.Configuration.AddEnvironmentVariables();
152146
webApplicationBuilder.Configuration.AddCommandLine(strings);
153147
}

Applications/ConsumerApi/src/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,6 @@ static void LoadConfiguration(WebApplicationBuilder webApplicationBuilder, strin
224224
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: false)
225225
.AddJsonFile("appsettings.override.json", optional: true, reloadOnChange: true);
226226

227-
if (env.IsDevelopment())
228-
{
229-
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
230-
webApplicationBuilder.Configuration.AddUserSecrets(appAssembly, optional: true);
231-
}
232-
233227
webApplicationBuilder.Configuration.AddEnvironmentVariables();
234228
webApplicationBuilder.Configuration.AddCommandLine(strings);
235229
}

Applications/DatabaseMigrator/src/DatabaseMigrator/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ static IHostBuilder CreateHostBuilder(string[] args)
4747
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true)
4848
.AddJsonFile("appsettings.override.json", optional: true, reloadOnChange: true);
4949

50-
if (env.IsDevelopment())
51-
{
52-
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
53-
configuration.AddUserSecrets(appAssembly, optional: true);
54-
}
55-
5650
configuration.AddEnvironmentVariables();
5751
configuration.AddCommandLine(args);
5852
})

Applications/EventHandlerService/src/EventHandlerService/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ static IHostBuilder CreateHostBuilder(string[] args)
6464
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true)
6565
.AddJsonFile("appsettings.override.json", optional: true, reloadOnChange: true);
6666

67-
if (env.IsDevelopment())
68-
{
69-
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
70-
configuration.AddUserSecrets(appAssembly, optional: true);
71-
}
72-
7367
configuration.AddEnvironmentVariables();
7468
configuration.AddCommandLine(args);
7569
})

Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ public static IHostBuilder CreateHostBuilder(string[] args)
7070
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true)
7171
.AddJsonFile("appsettings.override.json", optional: true, reloadOnChange: true);
7272

73-
if (env.IsDevelopment())
74-
{
75-
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
76-
configuration.AddUserSecrets(appAssembly, optional: true);
77-
}
78-
7973
configuration.AddEnvironmentVariables();
8074
configuration.AddCommandLine(args);
8175
})

Applications/SseServer/src/SseServer/Program.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,6 @@ static void LoadConfiguration(WebApplicationBuilder webApplicationBuilder, strin
161161
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: false)
162162
.AddJsonFile("appsettings.override.json", optional: true, reloadOnChange: true);
163163

164-
if (env.IsDevelopment())
165-
{
166-
var appAssembly = Assembly.Load(new AssemblyName(env.ApplicationName));
167-
webApplicationBuilder.Configuration.AddUserSecrets(appAssembly, optional: true);
168-
}
169-
170164
webApplicationBuilder.Configuration.AddEnvironmentVariables();
171165
webApplicationBuilder.Configuration.AddCommandLine(strings);
172166
}

0 commit comments

Comments
 (0)