This commit is contained in:
parent
2e77371316
commit
89a90099a7
8 changed files with 22 additions and 12 deletions
|
|
@ -115,12 +115,15 @@ var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
|
|
||||||
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
|
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
|
||||||
|
|
||||||
// apply migrations
|
// apply migrations
|
||||||
//await using var scope = app.Services.CreateAsyncScope();
|
//await using var scope = app.Services.CreateAsyncScope();
|
||||||
|
|
|
||||||
|
|
@ -148,13 +148,15 @@ var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
|
|
||||||
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
// app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
app.UseMiddleware<RequestLoggingMiddleware>();
|
// app.UseMiddleware<RequestLoggingMiddleware>();
|
||||||
|
|
||||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -164,13 +164,14 @@ var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
// app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
app.UseMiddleware<RequestLoggingMiddleware>();
|
// app.UseMiddleware<RequestLoggingMiddleware>();
|
||||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
||||||
{
|
{
|
||||||
Authorization = new[] { new CustomAuthorizeFilter() }
|
Authorization = new[] { new CustomAuthorizeFilter() }
|
||||||
|
|
|
||||||
|
|
@ -131,12 +131,13 @@ var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
//app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
|
|
||||||
// apply migrations
|
// apply migrations
|
||||||
await using var scope = app.Services.CreateAsyncScope();
|
await using var scope = app.Services.CreateAsyncScope();
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ var app = builder.Build();
|
||||||
|
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
|
||||||
|
|
@ -147,13 +147,14 @@ var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
// app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
app.UseMiddleware<RequestLoggingMiddleware>();
|
// app.UseMiddleware<RequestLoggingMiddleware>();
|
||||||
|
|
||||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -123,12 +123,13 @@ var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
//app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
|
|
||||||
// apply migrations
|
// apply migrations
|
||||||
await using var scope = app.Services.CreateAsyncScope();
|
await using var scope = app.Services.CreateAsyncScope();
|
||||||
|
|
|
||||||
|
|
@ -155,13 +155,14 @@ var app = builder.Build();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
|
app.UseMiddleware<CombinedErrorHandlerAndLoggingMiddleware>();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.UseDefaultFiles();
|
app.UseDefaultFiles();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
// app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
app.UseMiddleware<RequestLoggingMiddleware>();
|
// app.UseMiddleware<RequestLoggingMiddleware>();
|
||||||
|
|
||||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue