Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

1.3.0

Compare
Choose a tag to compare
@stefanprodan stefanprodan released this 21 Oct 16:19
· 68 commits to master since this release

OWIN Middleware

Introducing ThrottlingMiddleware, an OWIN middleware component that works the same as the ThrottlingHandler. With the ThrottlingMiddleware you can target endpoints outside of the WebAPI area, like OAuth middleware or SignalR endpoints.

Configuration example:

public class Startup
{
    public void Configuration(IAppBuilder appBuilder)
    {

    //throtting middleware with policy loaded from config
    appBuilder.Use(typeof(ThrottlingMiddleware),
        ThrottlePolicy.FromStore(new PolicyConfigurationProvider()),
        new PolicyCacheRepository(),
        new CacheRepository(),
        null);

    }
}

More examples here