Files
2026-10-16 23:33:13 -07:00

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;
}
}
}