mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 07:29:00 -07:00
28 lines
553 B
C#
28 lines
553 B
C#
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;
|
|
}
|
|
}
|
|
}
|