ReqThrottle.KeyGenerators (req_throttle v0.2.0)

Copy Markdown View Source

Pre-configured key generator functions for rate limiting.

These functions can be used with ReqThrottle.attach/2 to generate rate limit keys from request URLs.

Summary

Functions

Key generator that uses the request host.

Key generator that uses host and path.

Key generator that uses the request path.

Key generator that uses the full URL.

Functions

key_by_host(request)

Key generator that uses the request host.

key_by_host_and_path(request)

Key generator that uses host and path.

key_by_path(request)

Key generator that uses the request path.

key_by_url(request)

Key generator that uses the full URL.