Endpoint filter factory was called twice.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
Minimal-API's endpoint filter factory was called twice.
### Expected Behavior
Minimal-API's endpoint filter factory was called once.
### Steps To Reproduce
``` csharp
app.MapGet("/api/a", () => { })
.AddEndpointFilterFactory((ctx, next) =>
{
ctx.ApplicationServices.GetService>()!.LogError("Enter!!!!!!!!!!!!");
return (ctxf) => next(ctxf);
});
```

### Exceptions (if any)
_No response_
### .NET Version
_No response_
### Anything else?
- ASP.NET Core version: 8.0 and 9.0.
- VS version: 17.12.1
Contributor guide
Assessment
This issue has not been assessed yet.