From 7acea04991cb520b6f7e7f59448f81a5b5959f5f Mon Sep 17 00:00:00 2001 From: Ronny Gunawan <3048897+ronnygunawan@users.noreply.github.com> Date: Sun, 26 Nov 2023 14:55:01 +0700 Subject: [PATCH] Remove custom configuration sources --- BotNet/Program.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/BotNet/Program.cs b/BotNet/Program.cs index 5fe62b6..a043de1 100644 --- a/BotNet/Program.cs +++ b/BotNet/Program.cs @@ -24,20 +24,12 @@ using BotNet.Services.Weather; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Orleans.Hosting; WebApplicationBuilder builder = WebApplication.CreateBuilder(args); -// Configuration sources -builder.Configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true, reloadOnChange: true) - .AddKeyPerFile("/run/secrets", optional: true, reloadOnChange: true) - .AddEnvironmentVariables("ASPNETCORE_") - .AddUserSecrets(optional: true, reloadOnChange: true); - // DI Services builder.Services.Configure(builder.Configuration.GetSection("HostingOptions")); builder.Services.Configure(builder.Configuration.GetSection("TenorOptions")); @@ -102,6 +94,6 @@ app.UseRouting(); app.UseResponseCaching(); app.UseResponseCompression(); -app.MapControllers(); +app.MapDefaultControllerRoute(); app.Run();