แก้บั้ก Global Exception Middleware
This commit is contained in:
parent
b99d7e759b
commit
01c55f296d
3 changed files with 6 additions and 3 deletions
|
|
@ -113,13 +113,14 @@ var app = builder.Build();
|
|||
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||
app.UseCors();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles();
|
||||
app.MapControllers();
|
||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||
|
||||
|
||||
// apply migrations
|
||||
await using var scope = app.Services.CreateAsyncScope();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue