add(tools):添加signalR调试工具
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
using IM_API.Configs;
|
||||
using IM_API.Hubs;
|
||||
using IM_API.Models;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -42,7 +43,6 @@ namespace IM_API
|
||||
policy.AllowAnyHeader()
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyOrigin()
|
||||
.AllowAnyOrigin();
|
||||
});
|
||||
});
|
||||
@@ -104,6 +104,8 @@ namespace IM_API
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseCors();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
@@ -120,6 +122,8 @@ namespace IM_API
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.MapHub<ChatHub>("/chat").RequireCors();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user