ActivityPub.Web.ActivityPubController (Bonfire v1.0.1-social-alpha.28)
View SourceEndpoints for serving objects and collections, so the ActivityPub API can be used to read information from the server.
Even though we store the data in AS format, some changes need to be applied to the entity before serving it in the AP REST response. This is done in ActivityPub.Web.ActivityPubView.
Summary
Functions
Rate limit plug for controllers.
Reads configuration from Application.get_env(:activity_pub, :rate_limit)[key_prefix] with fallback to default options provided in the plug call.
Options
:key_prefix- Prefix for the rate limit bucket key (required):scale_ms- Default time window in milliseconds (can be overridden by config):limit- Default number of requests (can be overridden by config)
Examples
plug :rate_limit,
key_prefix: :webfinger,
scale_ms: 60_000,
limit: 200