public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseResponseCompression();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseAuthentication();
app.UseRouting();
app.UseAuthorization();
app.UseCors("AllowAnyOrigin");
app.UseOpenApi();
app.UseSwaggerUi3();
app.UseEndpoints(builder =>
{
builder.MapControllers();
builder.MapHub<AlarmNotificationsHub>("/alarms-notifications-hub");
builder.MapHub<AccessLogHub>("/accesslog");
});
}
}