Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/laget-se/laget.limiter.stores.mongo

MongoDB store implementation for laget.Limiter...
https://github.com/laget-se/laget.limiter.stores.mongo

mongo nuget

Last synced: 22 days ago
JSON representation

MongoDB store implementation for laget.Limiter...

Awesome Lists containing this project

README

        

# laget.Limiter.Store.Mongo
MongoDB store implementation for laget.Limiter...

![Nuget](https://img.shields.io/nuget/v/laget.Limiter.Stores.Mongo)
![Nuget](https://img.shields.io/nuget/dt/laget.Limiter.Stores.Mongo)

## Configuration
> This example is shown using Autofac since this is the go-to IoC for us.
```c#
builder.Register(c =>
new AuthorizationLimit(new MongoStore(new MongoUrl(c.Resolve().GetConnectionString("MongoConnectionString")), "authorization.calls"),
new StandardLimit(300, TimeSpan.FromHours(3)))
).SingleInstance();
```