a84712b708c1c642066461338eb389c7338b8dc4
Introduced a new `SerilogUiAccessOptions` class to define an allow-list of usernames and emails for accessing the Serilog UI. Added `SerilogUiSenderAuthorizationFilter` to enforce access control by authenticating requests using the `AuthScheme.Sender` scheme and validating against the configured allow-list. Updated `Program.cs` to: - Configure `SerilogUiAccessOptions` from `appsettings.json`. - Register and apply the `SerilogUiSenderAuthorizationFilter` as an async authorization filter for Serilog UI. - Add middleware to handle `/serilog-ui` requests and redirect unauthorized users to `/sender`. - Reintroduce `app.UseSerilogUi()` after the custom middleware. - Add routes `/log` and `/logs` to redirect to `/serilog-ui`. Updated `appsettings.json` to include a `SerilogUiAccess` section for configuring allowed users. These changes ensure that only authenticated and authorized users can access the Serilog UI.
Description
No description provided
Languages
JavaScript
82.8%
C#
8%
HTML
4.3%
Visual Basic .NET
2.6%
CSS
1.8%
Other
0.4%