feat: add support for configuring MRF
This commit adds support for allowing instances owners/admins to configure the simple Message Rewrite Facility (MRF) policy with their ansible-playbook configuration. With this they can reject/restrict messages from a list of specified instances. Further documentation: https://docs.pleroma.social/mrf.html#content This resolves dananglin/pleroma-ansible-playbook#4
This commit is contained in:
parent
e7ec293e75
commit
4749bf323e
2 changed files with 36 additions and 1 deletions
|
@ -14,6 +14,13 @@ pleroma_defaults:
|
||||||
remotePostRetentionDays: 90
|
remotePostRetentionDays: 90
|
||||||
logLevel: info
|
logLevel: info
|
||||||
federating: "true"
|
federating: "true"
|
||||||
|
mrf:
|
||||||
|
simplePolicy:
|
||||||
|
reject: []
|
||||||
|
federatedTimelineRemoval: []
|
||||||
|
mediaRemoval: []
|
||||||
|
mediaNsfw: []
|
||||||
|
reportRemoval: []
|
||||||
frontend:
|
frontend:
|
||||||
background: ""
|
background: ""
|
||||||
themes:
|
themes:
|
||||||
|
|
|
@ -24,7 +24,8 @@ config :pleroma, :instance,
|
||||||
healthcheck: {{ pleroma.config.healthCheck }},
|
healthcheck: {{ pleroma.config.healthCheck }},
|
||||||
remote_post_retention_days: {{ pleroma.config.remotePostRetentionDays }},
|
remote_post_retention_days: {{ pleroma.config.remotePostRetentionDays }},
|
||||||
dynamic_configuration: {{ pleroma.config.dynamicConfiguration }},
|
dynamic_configuration: {{ pleroma.config.dynamicConfiguration }},
|
||||||
federating: {{ pleroma.config.federating }}
|
federating: {{ pleroma.config.federating }},
|
||||||
|
rewrite_policy: [Pleroma.Web.ActivityPub.MRF.SimplePolicy]
|
||||||
|
|
||||||
config :pleroma, :media_proxy,
|
config :pleroma, :media_proxy,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
@ -82,3 +83,30 @@ config :pleroma, :frontend_configurations,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
theme: "{{ pleroma.config.frontend.themes.default }}"
|
theme: "{{ pleroma.config.frontend.themes.default }}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config :pleroma, :mrf_simple,
|
||||||
|
reject: [
|
||||||
|
{% for item in pleroma.config.mrf.simplePolicy.reject %}
|
||||||
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
||||||
|
{% endfor %}
|
||||||
|
],
|
||||||
|
federated_timeline_removal: [
|
||||||
|
{% for item in pleroma.config.mrf.simplePolicy.federatedTimelineRemoval %}
|
||||||
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
||||||
|
{% endfor %}
|
||||||
|
],
|
||||||
|
media_removal: [
|
||||||
|
{% for item in pleroma.config.mrf.simplePolicy.mediaRemoval %}
|
||||||
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
||||||
|
{% endfor %}
|
||||||
|
],
|
||||||
|
media_nsfw: [
|
||||||
|
{% for item in pleroma.config.mrf.simplePolicy.mediaNsfw %}
|
||||||
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
||||||
|
{% endfor %}
|
||||||
|
],
|
||||||
|
report_removal: [
|
||||||
|
{% for item in pleroma.config.mrf.simplePolicy.reportRemoval %}
|
||||||
|
"{{ item }}"{{ "," if not loop.last else "" }}
|
||||||
|
{% endfor %}
|
||||||
|
]
|
||||||
|
|
Reference in a new issue