mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 15:39:01 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace RadicadeServer.API.Notifications
|
||||
{
|
||||
public static class NotifyHubRoutes
|
||||
{
|
||||
public static readonly string[] Paths =
|
||||
{
|
||||
"/notify/hub/v1",
|
||||
"/notify/hub",
|
||||
"/notifyhub/v1",
|
||||
"/hub/v1",
|
||||
"/hub",
|
||||
};
|
||||
|
||||
public static bool IsHubPath(string? path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) return false;
|
||||
|
||||
foreach (var route in Paths)
|
||||
{
|
||||
if (path.Equals(route, StringComparison.OrdinalIgnoreCase)) return true;
|
||||
if (path.StartsWith(route + "/", StringComparison.OrdinalIgnoreCase)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user