mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
- reload configs on change
- remove grpc config service replace with http - add messaging to channel
This commit is contained in:
parent
3490c5c8d8
commit
aa03d400d4
38 changed files with 304 additions and 377 deletions
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MareSynchronosShared.Utils;
|
||||
|
||||
public class AllowedControllersFeatureProvider : ControllerFeatureProvider
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly Type[] _allowedTypes;
|
||||
|
||||
public AllowedControllersFeatureProvider(params Type[] allowedTypes)
|
||||
{
|
||||
_allowedTypes = allowedTypes;
|
||||
}
|
||||
|
||||
protected override bool IsController(TypeInfo typeInfo)
|
||||
{
|
||||
return base.IsController(typeInfo) && _allowedTypes.Contains(typeInfo.AsType());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue