Skip to content

Commit

Permalink
NTBS-2074: Move middleware to before endpoint setup in startup
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoCie committed Mar 15, 2021
1 parent f1d2e58 commit 697feff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ntbs-service/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -582,17 +582,17 @@ Making this conditional is the result of serilog not playing nicely with WebAppl
app.UseMiddleware<ActivityDetectionMiddleware>();
}

if (Configuration.GetValue<bool>(Constants.AuditEnabledConfigValue))
{
app.UseMiddleware<AuditGetRequestMiddleWare>();
}

app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
endpoints.MapControllers();
});

if (Configuration.GetValue<bool>(Constants.AuditEnabledConfigValue))
{
app.UseMiddleware<AuditGetRequestMiddleWare>();
}

ConfigureHangfire(app);

var cultureInfo = new CultureInfo("en-GB");
Expand Down

0 comments on commit 697feff

Please sign in to comment.