diff --git a/Presentation/HushianWebApp/Program.cs b/Presentation/HushianWebApp/Program.cs index 55e72d6..f14acd2 100644 --- a/Presentation/HushianWebApp/Program.cs +++ b/Presentation/HushianWebApp/Program.cs @@ -7,8 +7,8 @@ using HushianWebApp.Service; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); - -builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:8080/api/") }); +string BaseAddress=builder.Configuration.GetSection("BaseAddress").Value; +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(BaseAddress) }); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); diff --git a/Presentation/HushianWebApp/wwwroot/appsettings.json b/Presentation/HushianWebApp/wwwroot/appsettings.json new file mode 100644 index 0000000..9a6d278 --- /dev/null +++ b/Presentation/HushianWebApp/wwwroot/appsettings.json @@ -0,0 +1,10 @@ +{ + "BaseAddress": "http://localhost:8080/api/", + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} \ No newline at end of file