fix: startup fixes
This commit is contained in:
@@ -11,15 +11,13 @@ builder.Services.AddMudServices();
|
|||||||
|
|
||||||
var apiPath = CredentialTools.ResolvePathOrThrow("api", "environment/api.json");
|
var apiPath = CredentialTools.ResolvePathOrThrow("api", "environment/api.json");
|
||||||
builder.Configuration.AddJsonFile(apiPath, optional: false, reloadOnChange: false);
|
builder.Configuration.AddJsonFile(apiPath, optional: false, reloadOnChange: false);
|
||||||
|
string apiUrl = builder.Configuration["Api:ContentApiUrl"] ?? throw new NullReferenceException("Api url is missing");
|
||||||
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,
|
// 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
|
// no proxy hop). The TrackController below reuses the "DeepDrft.API" client to forward
|
||||||
// the WASM client's public track calls upstream.
|
// the WASM client's public track calls upstream.
|
||||||
DeepDrftPublic.Client.Startup.ConfigureApiHttpClient(builder.Services, sqlApiUrl);
|
DeepDrftPublic.Client.Startup.ConfigureApiHttpClient(builder.Services, apiUrl);
|
||||||
DeepDrftPublic.Client.Startup.ConfigureContentServices(builder.Services, contentApiUrl);
|
DeepDrftPublic.Client.Startup.ConfigureContentServices(builder.Services, apiUrl);
|
||||||
DeepDrftPublic.Client.Startup.ConfigureDomainServices(builder.Services);
|
DeepDrftPublic.Client.Startup.ConfigureDomainServices(builder.Services);
|
||||||
|
|
||||||
Startup.ConfigureDomainServices(builder);
|
Startup.ConfigureDomainServices(builder);
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
{
|
{
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Debug",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Debug"
|
"Microsoft.AspNetCore": "Debug"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ApiUrls": {
|
|
||||||
"ContentApi": "http://localhost:12777/",
|
|
||||||
"SqlApi": "https://localhost:5002/"
|
|
||||||
},
|
|
||||||
"ForwardedHeaders": {
|
"ForwardedHeaders": {
|
||||||
"DisableHttpsRedirection": "true"
|
"DisableHttpsRedirection": "true"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user