Skip to content

Commit

Permalink
fix: pipeline middleware order
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Sep 10, 2024
1 parent 2975326 commit 56bbbd6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/TicketingService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@

var app = builder.Build();
app
.UseMiddleware<AddVersionHeaderMiddleware>()
.UseHealthChecks(new PathString("/tickets/health"), new HealthCheckOptions
{
ResultStatusCodes =
Expand All @@ -86,8 +87,6 @@
.UseAuthentication()
.UseAuthorization();

app.UseMiddleware<AddVersionHeaderMiddleware>();

// map endpoints
app.MapPost("/tickets/create", Handlers.Create)
.Produces((int)HttpStatusCode.OK, contentType: MediaTypeNames.Application.Json)
Expand Down

0 comments on commit 56bbbd6

Please sign in to comment.