From 43cfa28d068336a0711ef5c7a4256417e620f54e Mon Sep 17 00:00:00 2001 From: Beau Findlay Date: Tue, 12 Mar 2024 19:26:15 +0000 Subject: [PATCH] Test use base address --- BeauFindlay/src/BeauFindlay.Client/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeauFindlay/src/BeauFindlay.Client/Program.cs b/BeauFindlay/src/BeauFindlay.Client/Program.cs index 6f15f4e..35091e5 100644 --- a/BeauFindlay/src/BeauFindlay.Client/Program.cs +++ b/BeauFindlay/src/BeauFindlay.Client/Program.cs @@ -10,7 +10,7 @@ builder.RootComponents.Add("head::after"); var apiBase = builder.Configuration["ApiBase"] ?? throw new ArgumentException("API base address not found in config."); -builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(apiBase) }); +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); builder.Services.AddSingleton();