drempel v0.1.4 Drempel.Plugs.RateLimit View Source

Use this plug to enforce a rate limit on a Phoenix action, the default key is conn.remote_ip, the default bucket is {controller_module, action_name}.

Link to this section Summary

Functions

A default rate limit exceeded handler that just sends 429 "Too Many Requests"

Adds to the limit and assigns to :backoff if a backoff is needed

Link to this section Functions

Link to this function

rate_exceeded(conn, params) View Source

A default rate limit exceeded handler that just sends 429 "Too Many Requests".

Adds to the limit and assigns to :backoff if a backoff is needed