fix การใช้งาน middleware
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
Suphonchai Phoonsawat 2025-06-24 10:47:54 +07:00
parent 2e77371316
commit 89a90099a7
8 changed files with 22 additions and 12 deletions

View file

@ -123,12 +123,13 @@ var app = builder.Build();
app.UseHttpsRedirection();
app.UseCors();
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
app.UseAuthentication();
app.UseAuthorization();
app.UseDefaultFiles();
app.UseStaticFiles();
app.MapControllers();
app.UseMiddleware<ErrorHandlerMiddleware>();
//app.UseMiddleware<ErrorHandlerMiddleware>();
// apply migrations
await using var scope = app.Services.CreateAsyncScope();