From bff6a3dca5b5c9815b7ba5d1c71f009d1cf681f3 Mon Sep 17 00:00:00 2001 From: Stanley Dimant Date: Fri, 26 Aug 2022 16:02:44 +0200 Subject: [PATCH] allow connection to hub with fallback transports --- MareSynchronosServer/MareSynchronosServer/Startup.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/MareSynchronosServer/MareSynchronosServer/Startup.cs b/MareSynchronosServer/MareSynchronosServer/Startup.cs index 2d2e898..4ec1df9 100644 --- a/MareSynchronosServer/MareSynchronosServer/Startup.cs +++ b/MareSynchronosServer/MareSynchronosServer/Startup.cs @@ -31,9 +31,6 @@ namespace MareSynchronosServer public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { services.AddHttpContextAccessor(); @@ -125,7 +122,6 @@ namespace MareSynchronosServer }); } - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) @@ -136,7 +132,6 @@ namespace MareSynchronosServer else { app.UseExceptionHandler("/Error"); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } @@ -158,7 +153,7 @@ namespace MareSynchronosServer { options.ApplicationMaxBufferSize = 5242880; options.TransportMaxBufferSize = 5242880; - options.Transports = HttpTransportType.WebSockets; + options.Transports = HttpTransportType.WebSockets | HttpTransportType.ServerSentEvents | HttpTransportType.LongPolling; }); }); }