增加功能:Client增加SignalR支持
This commit is contained in:
parent
b33266e162
commit
e015dc73fe
|
@ -6,6 +6,7 @@ using Longbow.Configuration;
|
|||
using Longbow.Data;
|
||||
using Longbow.Logging;
|
||||
using Longbow.Web;
|
||||
using Longbow.Web.SignalR;
|
||||
using Longbow.Web.WebSockets;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
|
@ -49,7 +50,7 @@ namespace Bootstrap.Client
|
|||
.SetApplicationName(Configuration["ApplicationName"])
|
||||
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));
|
||||
if (Configuration["DisableAutomaticKeyGeneration"] == "True") dataProtectionBuilder.DisableAutomaticKeyGeneration();
|
||||
|
||||
services.AddSignalRManager();
|
||||
services.AddMvc(options =>
|
||||
{
|
||||
options.Filters.Add<BootstrapAdminAuthorizeFilter>();
|
||||
|
@ -89,6 +90,7 @@ namespace Bootstrap.Client
|
|||
app.UseBootstrapAdminAuthorization();
|
||||
app.UseWebSocketHandler(options => options.UseAuthentication = true);
|
||||
app.UseCacheManagerCorsHandler();
|
||||
app.UseSignalR(routes => { routes.MapHub("/NotiHub"); });
|
||||
app.UseMvc(routes =>
|
||||
{
|
||||
routes.MapRoute(
|
||||
|
|
|
@ -30,11 +30,13 @@
|
|||
<script src="~/js/bootstrap.bundle.js"></script>
|
||||
<script src="~/js/jquery.mCustomScrollbar.js"></script>
|
||||
<script src="~/js/toastr.js"></script>
|
||||
<script src="~/js/signalr.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="~/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/jquery.mCustomScrollbar.concat.min.js"></script>
|
||||
<script src="~/js/toastr.min.js"></script>
|
||||
<script src="~/js/signalr.min.js"></script>
|
||||
</environment>
|
||||
<script src="~/js/jquery.dcjqaccordion.2.7.js"></script>
|
||||
<script src="~/js/longbow.common.js" asp-append-version="true"></script>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"version": "1.0",
|
||||
"defaultProvider": "unpkg",
|
||||
"libraries": [
|
||||
{
|
||||
"library": "@aspnet/signalr@1.0.4",
|
||||
"destination": "wwwroot/lib/@aspnet/signalr/",
|
||||
"files": [
|
||||
"dist/browser/signalr.js",
|
||||
"dist/browser/signalr.js.map",
|
||||
"dist/browser/signalr.min.js",
|
||||
"dist/browser/signalr.min.js.map"
|
||||
]
|
||||
},
|
||||
{
|
||||
"library": "jquery@3.3.1",
|
||||
"destination": "wwwroot/lib/@aspnet/jquery/",
|
||||
"files": [
|
||||
"dist/jquery.js",
|
||||
"dist/jquery.min.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue