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