ปรับ Middleware โดยรวม Exception + LogWriter ไว้ด้วยกัน
This commit is contained in:
parent
f4b3eeac76
commit
2e77371316
5 changed files with 744 additions and 98 deletions
|
|
@ -155,14 +155,19 @@ app.MapHealthChecks("/health");
|
|||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseCors();
|
||||
|
||||
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles();
|
||||
app.MapControllers();
|
||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||
// Disable ก่อน เพื่อแก้ไขให้เรีบร้อยก่อนการใช้งาน
|
||||
app.UseMiddleware<RequestLoggingMiddleware>();
|
||||
// app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||
// // Disable ก่อน เพื่อแก้ไขให้เรีบร้อยก่อนการใช้งาน
|
||||
// app.UseMiddleware<RequestLoggingMiddleware>();
|
||||
|
||||
|
||||
|
||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue