feat(ui): login redirect + configurable API URL
- Login: redirect to original page after auth via returnUrl query param - RedirectToLogin: encodes current URL as ?returnUrl=/path - API URL: configurable via appsettings.json ApiBaseUrl or API_BASE_URL env - NotFound page: preserved from template
This commit is contained in:
1 parent
da123ec544
commit
cb855f83b8
4 files changed
+19
-4
No files matched your search
@@ -22,9 +22,12 @@ builder.Services.AddMudServices(config =>
|
||||
});
|
||||
|
||||
builder.Services.AddScoped<HeimdallApiClient>();
|
||||
var apiBaseUrl = builder.Configuration.GetValue<string>("ApiBaseUrl")
|
||||
?? Environment.GetEnvironmentVariable("API_BASE_URL")
|
||||
?? "http://localhost:5000";
|
||||
builder.Services.AddHttpClient("HeimdallApi", client =>
|
||||
{
|
||||
client.BaseAddress = new Uri("http://localhost:5000/");
|
||||
client.BaseAddress = new Uri(apiBaseUrl.TrimEnd('/') + "/");
|
||||
client.Timeout = TimeSpan.FromSeconds(30);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user