- key: :reject_deletes,
- type: {:list, :string},
- description: "List of instances to reject deletions from",
- suggestions: ["example.com", "*.example.com"]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_activity_expiration,
- tab: :mrf,
- label: "MRF Activity Expiration Policy",
- type: :group,
- description: "Adds automatic expiration to all local activities",
- children: [
- %{
- key: :days,
- type: :integer,
- description: "Default global expiration time for all local activities (in days)",
- suggestions: [90, 365]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_subchain,
- tab: :mrf,
- label: "MRF Subchain",
- type: :group,
- description:
- "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <>
- " All criteria are configured as a map of regular expressions to lists of policy modules.",
- children: [
- %{
- key: :match_actor,
- type: {:map, {:list, :string}},
- description: "Matches a series of regular expressions against the actor field",
- suggestions: [
- %{
- ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy]
- }
- ]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_rejectnonpublic,
- tab: :mrf,
- description: "RejectNonPublic drops posts with non-public visibility settings.",
- label: "MRF Reject Non Public",
- type: :group,
- children: [
- %{
- key: :allow_followersonly,
- label: "Allow followers-only",
- type: :boolean,
- description: "Whether to allow followers-only posts"
- },
- %{
- key: :allow_direct,
- type: :boolean,
- description: "Whether to allow direct messages"
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_hellthread,
- tab: :mrf,
- label: "MRF Hellthread",
- type: :group,
- description: "Block messages with excessive user mentions",
- children: [
- %{
- key: :delist_threshold,
- type: :integer,
- description:
- "Number of mentioned users after which the message gets removed from timelines and" <>
- "disables notifications. Set to 0 to disable.",
- suggestions: [10]
- },
- %{
- key: :reject_threshold,
- type: :integer,
- description:
- "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.",
- suggestions: [20]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_keyword,
- tab: :mrf,
- label: "MRF Keyword",
- type: :group,
- description: "Reject or Word-Replace messages with a keyword or regex",
- children: [
- %{
- key: :reject,
- type: {:list, :string},
- description:
- "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.",
- suggestions: ["foo", ~r/foo/iu]
- },
- %{
- key: :federated_timeline_removal,
- type: {:list, :string},
- description:
- "A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). Each pattern can be a string or a regular expression.",
- suggestions: ["foo", ~r/foo/iu]
- },
- %{
- key: :replace,
- type: {:list, :tuple},
- description:
- "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.",
- suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_mention,
- tab: :mrf,
- label: "MRF Mention",
- type: :group,
- description: "Block messages which mention a specific user",
- children: [
- %{
- key: :actors,
- type: {:list, :string},
- description: "A list of actors for which any post mentioning them will be dropped",
- suggestions: ["actor1", "actor2"]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_vocabulary,
- tab: :mrf,
- label: "MRF Vocabulary",
- type: :group,
- description: "Filter messages which belong to certain activity vocabularies",
- children: [
- %{
- key: :accept,
- type: {:list, :string},
- description:
- "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted.",
- suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
- },
- %{
- key: :reject,
- type: {:list, :string},
- description:
- "A list of ActivityStreams terms to reject. If empty, no messages are rejected.",
- suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
- }
- ]
- },
- # %{
- # group: :pleroma,
- # key: :mrf_user_allowlist,
- # type: :map,
- # description:
- # "The keys in this section are the domain names that the policy should apply to." <>
- # " Each key should be assigned a list of users that should be allowed through by their ActivityPub ID",
- # suggestions: [
- # %{"example.org" => ["https://example.org/users/admin"]}
- # ]
- # ]
- # },
- %{
- group: :pleroma,
- key: :media_proxy,
- type: :group,
- description: "Media proxy",
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enables proxying of remote media to the instance's proxy"
- },
- %{
- key: :base_url,
- label: "Base URL",
- type: :string,
- description:
- "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
- suggestions: ["https://example.com"]
- },
- %{
- key: :invalidation,
- type: :keyword,
- descpiption: "",
- suggestions: [
- enabled: true,
- provider: Pleroma.Web.MediaProxy.Invalidation.Script
- ],
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enables invalidate media cache"
- },
- %{
- key: :provider,
- type: :module,
- description: "Module which will be used to cache purge.",
- suggestions: [
- Pleroma.Web.MediaProxy.Invalidation.Script,
- Pleroma.Web.MediaProxy.Invalidation.Http
- ]
- }
- ]
- },
- %{
- key: :proxy_opts,
- label: "Proxy Options",
- type: :keyword,
- description: "Options for Pleroma.ReverseProxy",
- suggestions: [
- redirect_on_failure: false,
- max_body_length: 25 * 1_048_576,
- http: [
- follow_redirect: true,
- pool: :media
- ]
- ],
- children: [
- %{
- key: :redirect_on_failure,
- type: :boolean,
- description:
- "Redirects the client to the real remote URL if there's any HTTP errors. " <>
- "Any error during body processing will not be redirected as the response is chunked."
- },
- %{
- key: :max_body_length,
- type: :integer,
- description:
- "Limits the content length to be approximately the " <>
- "specified length. It is validated with the `content-length` header and also verified when proxying."
- },
- %{
- key: :http,
- label: "HTTP",
- type: :keyword,
- description: "HTTP options",
- children: [
- %{
- key: :adapter,
- type: :keyword,
- description: "Adapter specific options",
- children: [
- %{
- key: :ssl_options,
- type: :keyword,
- label: "SSL Options",
- description: "SSL options for HTTP adapter",
- children: [
- %{
- key: :versions,
- type: {:list, :atom},
- description: "List of TLS version to use",
- suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
- }
- ]
- }
- ]
- },
- %{
- key: :proxy_url,
- label: "Proxy URL",
- type: [:string, :tuple],
- description: "Proxy URL",
- suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
- }
- ]
- }
- ]
- },
- %{
- key: :whitelist,
- type: {:list, :string},
- description: "List of hosts with scheme to bypass the mediaproxy",
- suggestions: ["http://example.com"]