2018-06-11 21:27:16 +00:00
|
|
|
# Configuring Pleroma
|
|
|
|
|
|
|
|
In the `config/` directory, you will find the following relevant files:
|
2018-06-13 04:40:22 +00:00
|
|
|
|
2018-06-11 21:27:16 +00:00
|
|
|
* `config.exs`: default base configuration
|
|
|
|
* `dev.exs`: default additional configuration for `MIX_ENV=dev`
|
|
|
|
* `prod.exs`: default additional configuration for `MIX_ENV=prod`
|
|
|
|
|
2018-06-13 04:38:28 +00:00
|
|
|
|
|
|
|
Do not modify files in the list above.
|
|
|
|
Instead, overload the settings by editing the following files:
|
2018-06-13 04:40:22 +00:00
|
|
|
|
2018-06-11 21:29:50 +00:00
|
|
|
* `dev.secret.exs`: custom additional configuration for `MIX_ENV=dev`
|
|
|
|
* `prod.secret.exs`: custom additional configuration for `MIX_ENV=prod`
|
2018-06-11 21:27:16 +00:00
|
|
|
|
|
|
|
## Message Rewrite Filters (MRFs)
|
|
|
|
|
|
|
|
Modify incoming and outgoing posts.
|
|
|
|
|
|
|
|
config :pleroma, :instance,
|
|
|
|
rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy
|
|
|
|
|
2018-06-13 04:38:28 +00:00
|
|
|
`rewrite_policy` specifies which MRF policies to apply.
|
|
|
|
It can either be a single policy or a list of policies.
|
2018-06-11 21:27:16 +00:00
|
|
|
Currently, MRFs availible by default are:
|
2018-06-13 04:40:22 +00:00
|
|
|
|
2018-06-11 21:27:16 +00:00
|
|
|
* `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`
|
|
|
|
* `Pleroma.Web.ActivityPub.MRF.DropPolicy`
|
|
|
|
* `Pleroma.Web.ActivityPub.MRF.SimplePolicy`
|
|
|
|
* `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`
|
|
|
|
|
2018-06-13 04:38:28 +00:00
|
|
|
Some policies, such as SimplePolicy and RejectNonPublic,
|
|
|
|
can be additionally configured in their respective sections.
|
2018-06-11 21:27:16 +00:00
|
|
|
|
|
|
|
### NoOpPolicy
|
|
|
|
|
|
|
|
Does not modify posts (this is the default `rewrite_policy`)
|
|
|
|
|
|
|
|
### DropPolicy
|
|
|
|
|
2018-06-13 04:38:28 +00:00
|
|
|
Drops all posts.
|
|
|
|
It generally does not make sense to use this in production.
|
2018-06-11 21:27:16 +00:00
|
|
|
|
|
|
|
### SimplePolicy
|
|
|
|
|
2018-06-11 21:42:57 +00:00
|
|
|
Restricts the visibility of posts from certain instances.
|
2018-06-11 21:27:16 +00:00
|
|
|
|
|
|
|
config :pleroma, :mrf_simple,
|
|
|
|
media_removal: [],
|
|
|
|
media_nsfw: [],
|
|
|
|
federated_timeline_removal: [],
|
2018-06-19 21:23:37 +00:00
|
|
|
reject: [],
|
|
|
|
accept: []
|
2018-06-11 21:27:16 +00:00
|
|
|
|
2018-06-13 04:38:28 +00:00
|
|
|
* `media_removal`: posts from these instances will have attachments
|
|
|
|
removed
|
|
|
|
* `media_nsfw`: posts from these instances will have attachments marked
|
|
|
|
as nsfw
|
|
|
|
* `federated_timeline_removal`: posts from these instances will be
|
|
|
|
marked as unlisted
|
2018-06-11 21:27:16 +00:00
|
|
|
* `reject`: posts from these instances will be dropped
|
2018-06-19 21:23:37 +00:00
|
|
|
* `accept`: if not empty, only posts from these instances will be accepted
|
2018-06-11 21:27:16 +00:00
|
|
|
|
|
|
|
### RejectNonPublic
|
|
|
|
|
|
|
|
Drops posts with non-public visibility settings.
|
|
|
|
|
|
|
|
config :pleroma :mrf_rejectnonpublic
|
|
|
|
allow_followersonly: false,
|
|
|
|
allow_direct: false,
|
|
|
|
|
2018-06-13 04:38:28 +00:00
|
|
|
* `allow_followersonly`: whether to allow follower-only posts through
|
|
|
|
the filter
|
2018-06-11 21:27:16 +00:00
|
|
|
* `allow_direct`: whether to allow direct messages through the filter
|