ActivityPub.Web.WebFingerController (Bonfire v1.0.1-social-alpha.28)

View Source

Summary

Functions

Returns a compliant host-meta response per RFC 6415. This enables WebFinger discovery by providing the template URL.

Rate limit plug for controllers.

Functions

host_meta(conn, params)

Returns a compliant host-meta response per RFC 6415. This enables WebFinger discovery by providing the template URL.

rate_limit(conn, opts)

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

webfinger(conn, arg2)