cleanup(worker): drop empty Worker BackgroundService; fix gateway ticket guard

- Remove the no-op Worker BackgroundService and its registration; the process
  is kept alive and does its work through the MassTransit bus and the upload
  intent jobs (their own hosted services)
- Fix the gateway middleware guard to reject on string.IsNullOrEmpty(prefix)
  instead of 'is null', which no longer matched TicketValidator returning
  string.Empty for invalid tickets (invalid tickets skipped the 401 and an
  empty object key could slip through)

Build: 0 warnings, 0 errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-05 22:13:20 +02:00
co-authored by Claude Opus 4.8
parent e15e587267
commit 573539ea1b
3 changed files with 1 additions and 13 deletions
@@ -30,7 +30,7 @@ public sealed class TicketValidationMiddleware(
var prefix = await ticketValidator.ValidateTicketAsync(token);
if (prefix is null)
if (string.IsNullOrEmpty(prefix))
{
logger.LogWarning("Rejected media request {Path}: missing or invalid ticket", path);
context.Response.StatusCode = StatusCodes.Status401Unauthorized;