|
@@ -31,6 +31,7 @@ using static HiTeachCE.Controllers.LoginController;
|
|
using VueCliMiddleware;
|
|
using VueCliMiddleware;
|
|
using Microsoft.AspNetCore.SpaServices;
|
|
using Microsoft.AspNetCore.SpaServices;
|
|
using HiTeachCE.Extension.Mqtt;
|
|
using HiTeachCE.Extension.Mqtt;
|
|
|
|
+using HiTeachCE.Context;
|
|
|
|
|
|
namespace HiTeachCE
|
|
namespace HiTeachCE
|
|
{
|
|
{
|
|
@@ -90,6 +91,11 @@ namespace HiTeachCE
|
|
x.MultipartHeadersLengthLimit = int.MaxValue;
|
|
x.MultipartHeadersLengthLimit = int.MaxValue;
|
|
});
|
|
});
|
|
services.MQTTConnection();
|
|
services.MQTTConnection();
|
|
|
|
+ // Add framework services.
|
|
|
|
+ services.AddMvc(options =>
|
|
|
|
+ {
|
|
|
|
+ options.Filters.Add(new ApiExceptionFilterAttribute());
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
|
@@ -105,7 +111,9 @@ namespace HiTeachCE
|
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
|
// 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.UseHsts();
|
|
}
|
|
}
|
|
- app.UseMiddleware<HiTeachCE.Context.HttpGlobalExceptionInvoke>();
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // app.UseMiddleware<HiTeachCE.Context.HttpGlobalExceptionInvoke>();
|
|
app.UseHttpsRedirection();
|
|
app.UseHttpsRedirection();
|
|
app.UseStaticFiles();
|
|
app.UseStaticFiles();
|
|
|
|
|