fix(web): use port 8080 as default API_BASE_URL for Docker compat
The HeimdallApiClient calls the API via HTTP on localhost. Inside Docker, the app listens on port 8080 (ASPNETCORE_URLS), but the default was 5000 (host-mapped port) — causing connection refused on all API calls from Blazor Server UI. Fix: change default from localhost:5000 to localhost:8080.
This commit is contained in:
1 parent
34037c20bf
commit
8ac088de38
1 file changed
+1
-1
@@ -125,7 +125,7 @@ builder.Services.AddScoped<AgentFailoverJob>();
|
||||
builder.Services.AddScoped<HeimdallApiClient>();
|
||||
var apiBaseUrl = builder.Configuration.GetValue<string>("ApiBaseUrl")
|
||||
?? Environment.GetEnvironmentVariable("API_BASE_URL")
|
||||
?? "http://localhost:5000";
|
||||
?? "http://localhost:8080";
|
||||
builder.Services.AddHttpClient("HeimdallApi", client =>
|
||||
{
|
||||
client.BaseAddress = new Uri(apiBaseUrl.TrimEnd('/') + "/");
|
||||
|
||||
Reference in new issue
Block a user