Proxy WASM track traffic through DeepDrftPublic to DeepDrftAPI

This commit is contained in:
Daniel Harvey
2026-05-25 19:11:00 -04:00
parent 02e230e236
commit e2a7944077
4 changed files with 121 additions and 15 deletions
+7 -1
View File
@@ -11,13 +11,17 @@ builder.Services.AddMudServices();
var contentApiUrl = builder.Configuration["ApiUrls:ContentApi"] ?? throw new Exception("Content API URL is not configured");
var sqlApiUrl = builder.Configuration["ApiUrls:SqlApi"] ?? throw new Exception("ApiUrls:SqlApi is not configured");
// Server-side, both named clients point straight at DeepDrftAPI (server-to-server,
// no proxy hop). The TrackController below reuses the "DeepDrft.API" client to forward
// the WASM client's public track calls upstream.
DeepDrftPublic.Client.Startup.ConfigureApiHttpClient(builder.Services, sqlApiUrl);
DeepDrftPublic.Client.Startup.ConfigureDomainServices(builder.Services);
DeepDrftPublic.Client.Startup.ConfigureContentServices(builder.Services, contentApiUrl);
DeepDrftPublic.Client.Startup.ConfigureDomainServices(builder.Services);
Startup.ConfigureDomainServices(builder);
// Add services to the container.
builder.Services.AddControllers();
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
@@ -99,6 +103,8 @@ if (app.Environment.IsDevelopment())
});
}
app.MapControllers();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()