细节调整
This commit is contained in:
parent
a16b14bd88
commit
4bbd55f677
|
|
@ -11,6 +11,8 @@ using LY.App.Model;
|
|||
using LY.App.MiddleWare;
|
||||
using LY.App.Common.WebSocket;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.AspNetCore.Http.Connections;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
|
@ -127,7 +129,12 @@ app.UseMiddleware<TokenValidationMiddleware>();
|
|||
//执行匹配的端点
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapHub<SocketHub>("/websocket");
|
||||
endpoints.MapHub<SocketHub>("/websocket", options =>
|
||||
{
|
||||
options.Transports =
|
||||
HttpTransportType.WebSockets |
|
||||
HttpTransportType.LongPolling;
|
||||
});
|
||||
endpoints.MapControllers();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue