fix(multiple): auth, workers, EF Core, MudTheme fixes
- Auth: AssignmentsController auth bug, ReleaseCamera result, logout endpoint - Security: open redirect fix - Workers: AgentState thread-safety, CameraStreamService async, HttpClientFactory - EF Core: AddCameraDiscoveryFields migration, DI interceptors, retry helper - UI: MudTheme palette config, aria-labels on icon buttons
This commit is contained in:
1 parent
4b83e35df0
commit
153be535d4
17 files changed
+1944
-32
No files matched your search
@@ -13,16 +13,19 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
private readonly AgentState _state;
|
||||
private readonly AgentOptions _options;
|
||||
private readonly ILogger<ConfigReceiverService> _logger;
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
private HubConnection? _connection;
|
||||
|
||||
public ConfigReceiverService(
|
||||
AgentState state,
|
||||
IOptions<AgentOptions> options,
|
||||
ILogger<ConfigReceiverService> logger)
|
||||
ILogger<ConfigReceiverService> logger,
|
||||
IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
_state = state;
|
||||
_options = options.Value;
|
||||
_logger = logger;
|
||||
_httpClientFactory = httpClientFactory;
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
@@ -143,7 +146,8 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
{
|
||||
try
|
||||
{
|
||||
using var http = new HttpClient { Timeout = TimeSpan.FromSeconds(10) };
|
||||
using var http = _httpClientFactory.CreateClient("Central");
|
||||
http.Timeout = TimeSpan.FromSeconds(10);
|
||||
http.DefaultRequestHeaders.Add("Authorization", $"Bearer {_state.ApiKey}");
|
||||
|
||||
var url = $"{_options.CentralUrl.TrimEnd('/')}/api/settings/agent/{_state.AgentId}";
|
||||
|
||||
Reference in new issue
Block a user