ikyriak / IdempotentAPI

A .NET library that handles the HTTP write operations (POST and PATCH) that can affect only once for the given request data and idempotency-key by using an ASP.NET Core attribute (filter).
MIT License
253 stars 38 forks source link

Possibility to configure controllers via IdempotencyOptions #68

Closed Jevvry closed 5 months ago

Jevvry commented 6 months ago

There are projects that contain a large number of controllers. Because of this, important idempotency settings such as ExpiresInMilliseconds, DistributedLockTimeoutMilli are dispersed throughout the project. And this increases the likelihood of a configuration error.

It seems to me that it would be convenient to add the ability to configure controllers via DI registration of IdempotencyOptions and optionally use these settings in the IdempotentAttribute.

ikyriak commented 5 months ago

Hello @Jevvry, Thank you for your time and implementation in configuring controllers via IdempotencyOptions. This is an excellent idea.