Fix: SignalR Authorize & Firefox Compatibility
Changes in architecture to support authorization and temporary workaround for NTLM in Firefox (to be removed in SignalR 2.x). Thanks to @davidfowl
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Disco.BI.Interop.SignalRHandlers;
|
||||
|
||||
namespace Disco.Web.Areas.API
|
||||
{
|
||||
@@ -16,14 +17,14 @@ namespace Disco.Web.Areas.API
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
context.Routes.MapConnection<Disco.Services.Logging.Targets.LogLiveContext>(
|
||||
"API_Logging_Notifications", "API/Logging/Notifications");
|
||||
context.Routes.MapConnection<LogNotifications>(
|
||||
"API_Logging_Notifications", "API/Logging/Notifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
||||
|
||||
context.Routes.MapConnection<Disco.Services.Tasks.ScheduledTasksLiveStatusService>(
|
||||
"API_Logging_TaskStatusNotifications", "API/Logging/TaskStatusNotifications");
|
||||
context.Routes.MapConnection<ScheduledTasksStatusNotifications>(
|
||||
"API_Logging_TaskStatusNotifications", "API/Logging/TaskStatusNotifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
||||
|
||||
context.Routes.MapConnection<Disco.BI.Interop.SignalRHandlers.RepositoryMonitorNotifications>(
|
||||
"API_Repository_Notifications", "API/Repository/Notifications");
|
||||
context.Routes.MapConnection<RepositoryMonitorNotifications>(
|
||||
"API_Repository_Notifications", "API/Repository/Notifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
||||
|
||||
context.MapRoute(
|
||||
"API_Update",
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
$(function () {
|
||||
var logEventsHost = $('LogEvents_@(uniqueId)');
|
||||
var logModuleId = '@(Model.ModuleFilter != null ? Model.ModuleFilter.ModuleId.ToString() : null)';
|
||||
var logModuleLiveGroupName = '@(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.Services.Logging.LogContext.LiveLogAllEventsGroupName)';
|
||||
var logModuleLiveGroupName = '@(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.BI.Interop.SignalRHandlers.LogNotifications.AllNotifications)';
|
||||
var logEventTypeFiltered = @(eventTypesFilterJson);
|
||||
var logStartFiler = @(AjaxHelpers.JsonDate(Model.StartFilter));
|
||||
var logEndFiler = @(AjaxHelpers.JsonDate(Model.EndFilter));
|
||||
|
||||
@@ -196,7 +196,7 @@ WriteLiteral("\';\r\n var logModuleLiveGroupName = \'");
|
||||
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\Shared\LogEvents.cshtml"
|
||||
Write(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.Services.Logging.LogContext.LiveLogAllEventsGroupName);
|
||||
Write(Model.ModuleFilter != null ? Model.ModuleFilter.LiveLogGroupName : Disco.BI.Interop.SignalRHandlers.LogNotifications.AllNotifications);
|
||||
|
||||
|
||||
#line default
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Disco.BI.Interop.SignalRHandlers;
|
||||
|
||||
namespace Disco.Web.Areas.Public
|
||||
{
|
||||
@@ -16,8 +17,8 @@ namespace Disco.Web.Areas.Public
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
context.Routes.MapConnection<BI.Interop.SignalRHandlers.UserHeldDevices>(
|
||||
"Public_UserHeldDevices_Notifications", "Public/UserHeldDevices/Notifications");
|
||||
context.Routes.MapConnection<UserHeldDeviceNotifications>(
|
||||
"Public_UserHeldDevices_Notifications", "Public/UserHeldDevices/Notifications", new ConnectionConfiguration(), SignalRAuthenticationWorkaround.AddMiddleware);
|
||||
|
||||
context.MapRoute(
|
||||
"Public_Credits",
|
||||
|
||||
Reference in New Issue
Block a user