|
@@ -360,6 +360,7 @@ builder.Services.TryAddSingleton(typeof(CommonService));
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
var app = builder.Build();
|
|
var app = builder.Build();
|
|
|
|
+
|
|
AutofacIocManager.Instance.Container = app.UseHostFiltering().ApplicationServices.GetAutofacRoot();
|
|
AutofacIocManager.Instance.Container = app.UseHostFiltering().ApplicationServices.GetAutofacRoot();
|
|
|
|
|
|
|
|
|
|
@@ -367,11 +368,15 @@ if (!app.Environment.IsDevelopment())
|
|
{
|
|
{
|
|
app.UseExceptionHandler("/Home/Error");
|
|
app.UseExceptionHandler("/Home/Error");
|
|
}
|
|
}
|
|
|
|
+
|
|
app.UseStaticFiles();
|
|
app.UseStaticFiles();
|
|
|
|
|
|
|
|
+app.UseMiddleware<FixedPromptMiddleware>();
|
|
app.UseMiddleware<ExceptionHandlingMiddleware>();
|
|
app.UseMiddleware<ExceptionHandlingMiddleware>();
|
|
|
|
|
|
app.UseRouting();
|
|
app.UseRouting();
|
|
|
|
+
|
|
|
|
+
|
|
app.UseCors("Cors");
|
|
app.UseCors("Cors");
|
|
|
|
|
|
app.UseAuthentication();
|
|
app.UseAuthentication();
|
|
@@ -430,6 +435,9 @@ app.MapHub<ChatHub>("/ChatHub", options =>
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
app.MapControllerRoute(
|
|
app.MapControllerRoute(
|
|
name: "default",
|
|
name: "default",
|
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|