31dbe4bc5160471633a1baf56e2ad3d3eeae3a9d
[akkoma] / config / description.exs
1 use Mix.Config
2 alias Pleroma.Docs.Generator
3
4 websocket_config = [
5 path: "/websocket",
6 serializer: [
7 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
8 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
9 ],
10 timeout: 60_000,
11 transport_log: false,
12 compress: false
13 ]
14
15 config :pleroma, :config_description, [
16 %{
17 group: :pleroma,
18 key: Pleroma.Upload,
19 type: :group,
20 description: "Upload general settings",
21 children: [
22 %{
23 key: :uploader,
24 type: :module,
25 description: "Module which will be used for uploads",
26 suggestions: [Pleroma.Uploaders.Local, Pleroma.Uploaders.S3]
27 },
28 %{
29 key: :filters,
30 type: {:list, :module},
31 description:
32 "List of filter modules for uploads. Module names are shortened (removed leading `Pleroma.Upload.Filter.` part), but on adding custom module you need to use full name.",
33 suggestions:
34 Generator.list_modules_in_dir(
35 "lib/pleroma/upload/filter",
36 "Elixir.Pleroma.Upload.Filter."
37 )
38 },
39 %{
40 key: :link_name,
41 type: :boolean,
42 description:
43 "If enabled, a name parameter will be added to the url of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
44 },
45 %{
46 key: :base_url,
47 type: :string,
48 description: "Base url for the uploads, needed if you use CDN",
49 suggestions: [
50 "https://cdn-host.com"
51 ]
52 },
53 %{
54 key: :proxy_remote,
55 type: :boolean,
56 description:
57 "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected"
58 },
59 %{
60 key: :proxy_opts,
61 type: :keyword,
62 description: "Options for Pleroma.ReverseProxy",
63 suggestions: [
64 redirect_on_failure: false,
65 max_body_length: 25 * 1_048_576,
66 http: [
67 follow_redirect: true,
68 pool: :media
69 ]
70 ],
71 children: [
72 %{
73 key: :redirect_on_failure,
74 type: :boolean,
75 description:
76 "Redirects the client to the real remote URL if there's any HTTP errors. " <>
77 "Any error during body processing will not be redirected as the response is chunked."
78 },
79 %{
80 key: :max_body_length,
81 type: :integer,
82 description:
83 "Limits the content length to be approximately the " <>
84 "specified length. It is validated with the `content-length` header and also verified when proxying."
85 },
86 %{
87 key: :http,
88 type: :keyword,
89 description: "HTTP options",
90 children: [
91 %{
92 key: :adapter,
93 type: :keyword,
94 description: "Adapter specific options",
95 children: [
96 %{
97 key: :ssl_options,
98 type: :keyword,
99 label: "SSL Options",
100 description: "SSL options for HTTP adapter",
101 children: [
102 %{
103 key: :versions,
104 type: {:list, :atom},
105 description: "List of TLS versions to use",
106 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
107 }
108 ]
109 }
110 ]
111 },
112 %{
113 key: :proxy_url,
114 label: "Proxy URL",
115 type: [:string, :tuple],
116 description: "Proxy URL",
117 suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
118 }
119 ]
120 }
121 ]
122 },
123 %{
124 key: :filename_display_max_length,
125 type: :integer,
126 description: "Set max length of a filename to display. 0 = no limit. Default: 30"
127 }
128 ]
129 },
130 %{
131 group: :pleroma,
132 key: Pleroma.Uploaders.Local,
133 type: :group,
134 description: "Local uploader-related settings",
135 children: [
136 %{
137 key: :uploads,
138 type: :string,
139 description: "Path where user's uploads will be saved",
140 suggestions: [
141 "uploads"
142 ]
143 }
144 ]
145 },
146 %{
147 group: :pleroma,
148 key: Pleroma.Uploaders.S3,
149 type: :group,
150 description: "S3 uploader-related settings",
151 children: [
152 %{
153 key: :bucket,
154 type: :string,
155 description: "S3 bucket",
156 suggestions: [
157 "bucket"
158 ]
159 },
160 %{
161 key: :bucket_namespace,
162 type: :string,
163 description: "S3 bucket namespace",
164 suggestions: ["pleroma"]
165 },
166 %{
167 key: :public_endpoint,
168 type: :string,
169 description: "S3 endpoint",
170 suggestions: ["https://s3.amazonaws.com"]
171 },
172 %{
173 key: :truncated_namespace,
174 type: :string,
175 description:
176 "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
177 " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint."
178 },
179 %{
180 key: :streaming_enabled,
181 type: :boolean,
182 description:
183 "Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems."
184 }
185 ]
186 },
187 %{
188 group: :pleroma,
189 key: Pleroma.Upload.Filter.Mogrify,
190 type: :group,
191 description: "Uploads mogrify filter settings",
192 children: [
193 %{
194 key: :args,
195 type: [:string, {:list, :string}, {:list, :tuple}],
196 description: "List of actions for the mogrify command",
197 suggestions: [
198 "strip",
199 "auto-orient",
200 {"implode", "1"}
201 ]
202 }
203 ]
204 },
205 %{
206 group: :pleroma,
207 key: Pleroma.Upload.Filter.AnonymizeFilename,
208 type: :group,
209 description: "Filter replaces the filename of the upload",
210 children: [
211 %{
212 key: :text,
213 type: :string,
214 description:
215 "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
216 " filename extension by using {extension}, for example custom-file-name.{extension}.",
217 suggestions: [
218 "custom-file-name.{extension}"
219 ]
220 }
221 ]
222 },
223 %{
224 group: :pleroma,
225 key: Pleroma.Emails.Mailer,
226 type: :group,
227 description: "Mailer-related settings",
228 children: [
229 %{
230 key: :adapter,
231 type: :module,
232 description:
233 "One of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters)," <>
234 " or Swoosh.Adapters.Local for in-memory mailbox",
235 suggestions: [
236 Swoosh.Adapters.SMTP,
237 Swoosh.Adapters.Sendgrid,
238 Swoosh.Adapters.Sendmail,
239 Swoosh.Adapters.Mandrill,
240 Swoosh.Adapters.Mailgun,
241 Swoosh.Adapters.Mailjet,
242 Swoosh.Adapters.Postmark,
243 Swoosh.Adapters.SparkPost,
244 Swoosh.Adapters.AmazonSES,
245 Swoosh.Adapters.Dyn,
246 Swoosh.Adapters.SocketLabs,
247 Swoosh.Adapters.Gmail,
248 Swoosh.Adapters.Local
249 ]
250 },
251 %{
252 key: :enabled,
253 type: :boolean,
254 description: "Allow/disallow send emails"
255 },
256 %{
257 group: {:subgroup, Swoosh.Adapters.SMTP},
258 key: :relay,
259 type: :string,
260 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
261 suggestions: ["smtp.gmail.com"]
262 },
263 %{
264 group: {:subgroup, Swoosh.Adapters.SMTP},
265 key: :username,
266 type: :string,
267 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
268 suggestions: ["pleroma"]
269 },
270 %{
271 group: {:subgroup, Swoosh.Adapters.SMTP},
272 key: :password,
273 type: :string,
274 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
275 suggestions: ["password"]
276 },
277 %{
278 group: {:subgroup, Swoosh.Adapters.SMTP},
279 key: :ssl,
280 label: "SSL",
281 type: :boolean,
282 description: "`Swoosh.Adapters.SMTP` adapter specific setting"
283 },
284 %{
285 group: {:subgroup, Swoosh.Adapters.SMTP},
286 key: :tls,
287 label: "TLS",
288 type: :atom,
289 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
290 suggestions: [:always, :never, :if_available]
291 },
292 %{
293 group: {:subgroup, Swoosh.Adapters.SMTP},
294 key: :auth,
295 type: :atom,
296 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
297 suggestions: [:always, :never, :if_available]
298 },
299 %{
300 group: {:subgroup, Swoosh.Adapters.SMTP},
301 key: :port,
302 type: :integer,
303 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
304 suggestions: [1025]
305 },
306 %{
307 group: {:subgroup, Swoosh.Adapters.SMTP},
308 key: :retries,
309 type: :integer,
310 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
311 suggestions: [5]
312 },
313 %{
314 group: {:subgroup, Swoosh.Adapters.SMTP},
315 key: :no_mx_lookups,
316 label: "No MX lookups",
317 type: :boolean,
318 description: "`Swoosh.Adapters.SMTP` adapter specific setting"
319 },
320 %{
321 group: {:subgroup, Swoosh.Adapters.Sendgrid},
322 key: :api_key,
323 label: "API key",
324 type: :string,
325 description: "`Swoosh.Adapters.Sendgrid` adapter specific setting",
326 suggestions: ["my-api-key"]
327 },
328 %{
329 group: {:subgroup, Swoosh.Adapters.Sendmail},
330 key: :cmd_path,
331 type: :string,
332 description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
333 suggestions: ["/usr/bin/sendmail"]
334 },
335 %{
336 group: {:subgroup, Swoosh.Adapters.Sendmail},
337 key: :cmd_args,
338 type: :string,
339 description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
340 suggestions: ["-N delay,failure,success"]
341 },
342 %{
343 group: {:subgroup, Swoosh.Adapters.Sendmail},
344 key: :qmail,
345 type: :boolean,
346 description: "`Swoosh.Adapters.Sendmail` adapter specific setting"
347 },
348 %{
349 group: {:subgroup, Swoosh.Adapters.Mandrill},
350 key: :api_key,
351 label: "API key",
352 type: :string,
353 description: "`Swoosh.Adapters.Mandrill` adapter specific setting",
354 suggestions: ["my-api-key"]
355 },
356 %{
357 group: {:subgroup, Swoosh.Adapters.Mailgun},
358 key: :api_key,
359 label: "API key",
360 type: :string,
361 description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
362 suggestions: ["my-api-key"]
363 },
364 %{
365 group: {:subgroup, Swoosh.Adapters.Mailgun},
366 key: :domain,
367 type: :string,
368 description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
369 suggestions: ["pleroma.com"]
370 },
371 %{
372 group: {:subgroup, Swoosh.Adapters.Mailjet},
373 key: :api_key,
374 label: "API key",
375 type: :string,
376 description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
377 suggestions: ["my-api-key"]
378 },
379 %{
380 group: {:subgroup, Swoosh.Adapters.Mailjet},
381 key: :secret,
382 type: :string,
383 description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
384 suggestions: ["my-secret-key"]
385 },
386 %{
387 group: {:subgroup, Swoosh.Adapters.Postmark},
388 key: :api_key,
389 label: "API key",
390 type: :string,
391 description: "`Swoosh.Adapters.Postmark` adapter specific setting",
392 suggestions: ["my-api-key"]
393 },
394 %{
395 group: {:subgroup, Swoosh.Adapters.SparkPost},
396 key: :api_key,
397 label: "API key",
398 type: :string,
399 description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
400 suggestions: ["my-api-key"]
401 },
402 %{
403 group: {:subgroup, Swoosh.Adapters.SparkPost},
404 key: :endpoint,
405 type: :string,
406 description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
407 suggestions: ["https://api.sparkpost.com/api/v1"]
408 },
409 %{
410 group: {:subgroup, Swoosh.Adapters.AmazonSES},
411 key: :region,
412 type: :string,
413 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
414 suggestions: ["us-east-1", "us-east-2"]
415 },
416 %{
417 group: {:subgroup, Swoosh.Adapters.AmazonSES},
418 key: :access_key,
419 type: :string,
420 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
421 suggestions: ["aws-access-key"]
422 },
423 %{
424 group: {:subgroup, Swoosh.Adapters.AmazonSES},
425 key: :secret,
426 type: :string,
427 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
428 suggestions: ["aws-secret-key"]
429 },
430 %{
431 group: {:subgroup, Swoosh.Adapters.Dyn},
432 key: :api_key,
433 label: "API key",
434 type: :string,
435 description: "`Swoosh.Adapters.Dyn` adapter specific setting",
436 suggestions: ["my-api-key"]
437 },
438 %{
439 group: {:subgroup, Swoosh.Adapters.SocketLabs},
440 key: :server_id,
441 type: :string,
442 description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
443 },
444 %{
445 group: {:subgroup, Swoosh.Adapters.SocketLabs},
446 key: :api_key,
447 label: "API key",
448 type: :string,
449 description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
450 },
451 %{
452 group: {:subgroup, Swoosh.Adapters.Gmail},
453 key: :access_token,
454 type: :string,
455 description: "`Swoosh.Adapters.Gmail` adapter specific setting"
456 }
457 ]
458 },
459 %{
460 group: :swoosh,
461 type: :group,
462 description: "`Swoosh.Adapters.Local` adapter specific settings",
463 children: [
464 %{
465 group: {:subgroup, Swoosh.Adapters.Local},
466 key: :serve_mailbox,
467 type: :boolean,
468 description: "Run the preview server together as part of your app"
469 },
470 %{
471 group: {:subgroup, Swoosh.Adapters.Local},
472 key: :preview_port,
473 type: :integer,
474 description: "The preview server port",
475 suggestions: [4001]
476 }
477 ]
478 },
479 %{
480 group: :pleroma,
481 key: :uri_schemes,
482 type: :group,
483 description: "URI schemes related settings",
484 children: [
485 %{
486 key: :valid_schemes,
487 type: {:list, :string},
488 description: "List of the scheme part that is considered valid to be an URL",
489 suggestions: [
490 "https",
491 "http",
492 "dat",
493 "dweb",
494 "gopher",
495 "ipfs",
496 "ipns",
497 "irc",
498 "ircs",
499 "magnet",
500 "mailto",
501 "mumble",
502 "ssb",
503 "xmpp"
504 ]
505 }
506 ]
507 },
508 %{
509 group: :pleroma,
510 key: :instance,
511 type: :group,
512 description: "Instance-related settings",
513 children: [
514 %{
515 key: :name,
516 type: :string,
517 description: "Name of the instance",
518 suggestions: [
519 "Pleroma"
520 ]
521 },
522 %{
523 key: :email,
524 label: "Admin Email Address",
525 type: :string,
526 description: "Email used to reach an Administrator/Moderator of the instance",
527 suggestions: [
528 "email@example.com"
529 ]
530 },
531 %{
532 key: :notify_email,
533 label: "Sender Email Address",
534 type: :string,
535 description: "Envelope FROM address for mail sent via Pleroma",
536 suggestions: [
537 "notify@example.com"
538 ]
539 },
540 %{
541 key: :description,
542 type: :string,
543 description:
544 "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
545 suggestions: [
546 "Very cool instance"
547 ]
548 },
549 %{
550 key: :limit,
551 type: :integer,
552 description: "Posts character limit (CW/Subject included in the counter)",
553 suggestions: [
554 5_000
555 ]
556 },
557 %{
558 key: :chat_limit,
559 type: :integer,
560 description: "Character limit of the instance chat messages",
561 suggestions: [
562 5_000
563 ]
564 },
565 %{
566 key: :remote_limit,
567 type: :integer,
568 description: "Hard character limit beyond which remote posts will be dropped",
569 suggestions: [
570 100_000
571 ]
572 },
573 %{
574 key: :upload_limit,
575 type: :integer,
576 description: "File size limit of uploads (except for avatar, background, banner)",
577 suggestions: [
578 16_000_000
579 ]
580 },
581 %{
582 key: :avatar_upload_limit,
583 type: :integer,
584 description: "File size limit of user's profile avatars",
585 suggestions: [
586 2_000_000
587 ]
588 },
589 %{
590 key: :background_upload_limit,
591 type: :integer,
592 description: "File size limit of user's profile backgrounds",
593 suggestions: [
594 4_000_000
595 ]
596 },
597 %{
598 key: :banner_upload_limit,
599 type: :integer,
600 description: "File size limit of user's profile banners",
601 suggestions: [
602 4_000_000
603 ]
604 },
605 %{
606 key: :poll_limits,
607 type: :map,
608 description: "A map with poll limits for local polls",
609 suggestions: [
610 %{
611 max_options: 20,
612 max_option_chars: 200,
613 min_expiration: 0,
614 max_expiration: 31_536_000
615 }
616 ],
617 children: [
618 %{
619 key: :max_options,
620 type: :integer,
621 description: "Maximum number of options",
622 suggestions: [20]
623 },
624 %{
625 key: :max_option_chars,
626 type: :integer,
627 description: "Maximum number of characters per option",
628 suggestions: [200]
629 },
630 %{
631 key: :min_expiration,
632 type: :integer,
633 description: "Minimum expiration time (in seconds)",
634 suggestions: [0]
635 },
636 %{
637 key: :max_expiration,
638 type: :integer,
639 description: "Maximum expiration time (in seconds)",
640 suggestions: [3600]
641 }
642 ]
643 },
644 %{
645 key: :registrations_open,
646 type: :boolean,
647 description:
648 "Enable registrations for anyone. Invitations require this setting to be disabled."
649 },
650 %{
651 key: :invites_enabled,
652 type: :boolean,
653 description:
654 "Enable user invitations for admins (depends on `registrations_open` being disabled)."
655 },
656 %{
657 key: :account_activation_required,
658 type: :boolean,
659 description: "Require users to confirm their emails before signing in."
660 },
661 %{
662 key: :federating,
663 type: :boolean,
664 description: "Enable federation with other instances."
665 },
666 %{
667 key: :federation_incoming_replies_max_depth,
668 label: "Fed. incoming replies max depth",
669 type: :integer,
670 description:
671 "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
672 " fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes.",
673 suggestions: [
674 100
675 ]
676 },
677 %{
678 key: :federation_reachability_timeout_days,
679 label: "Fed. reachability timeout days",
680 type: :integer,
681 description:
682 "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.",
683 suggestions: [
684 7
685 ]
686 },
687 %{
688 key: :allow_relay,
689 type: :boolean,
690 description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance"
691 },
692 %{
693 key: :rewrite_policy,
694 type: [:module, {:list, :module}],
695 description:
696 "A list of enabled MRF policies. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
697 suggestions:
698 Generator.list_modules_in_dir(
699 "lib/pleroma/web/activity_pub/mrf",
700 "Elixir.Pleroma.Web.ActivityPub.MRF."
701 )
702 },
703 %{
704 key: :public,
705 type: :boolean,
706 description:
707 "Makes the client API in authentificated mode-only except for user-profiles." <>
708 " Useful for disabling the Local Timeline and The Whole Known Network."
709 },
710 %{
711 key: :quarantined_instances,
712 type: {:list, :string},
713 description:
714 "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
715 suggestions: [
716 "quarantined.com",
717 "*.quarantined.com"
718 ]
719 },
720 %{
721 key: :managed_config,
722 type: :boolean,
723 description:
724 "Whenether the config for pleroma-fe is configured in this config or in static/config.json"
725 },
726 %{
727 key: :static_dir,
728 type: :string,
729 description: "Instance static directory",
730 suggestions: [
731 "instance/static/"
732 ]
733 },
734 %{
735 key: :allowed_post_formats,
736 type: {:list, :string},
737 description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
738 suggestions: [
739 "text/plain",
740 "text/html",
741 "text/markdown",
742 "text/bbcode"
743 ]
744 },
745 %{
746 key: :mrf_transparency,
747 label: "MRF transparency",
748 type: :boolean,
749 description:
750 "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
751 },
752 %{
753 key: :mrf_transparency_exclusions,
754 label: "MRF transparency exclusions",
755 type: {:list, :string},
756 description:
757 "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
758 suggestions: [
759 "exclusion.com"
760 ]
761 },
762 %{
763 key: :extended_nickname_format,
764 type: :boolean,
765 description:
766 "Enable to use extended local nicknames format (allows underscores/dashes)." <>
767 " This will break federation with older software for theses nicknames."
768 },
769 %{
770 key: :cleanup_attachments,
771 type: :boolean,
772 description: """
773 Enable to remove associated attachments when status is removed.
774 This will not affect duplicates and attachments without status.
775 Enabling this will increase load to database when deleting statuses on larger instances.
776 """
777 },
778 %{
779 key: :max_pinned_statuses,
780 type: :integer,
781 description: "The maximum number of pinned statuses. 0 will disable the feature.",
782 suggestions: [
783 0,
784 1,
785 3
786 ]
787 },
788 %{
789 key: :autofollowed_nicknames,
790 type: {:list, :string},
791 description:
792 "Set to nicknames of (local) users that every new user should automatically follow",
793 suggestions: [
794 "lain",
795 "kaniini",
796 "lanodan",
797 "rinpatch"
798 ]
799 },
800 %{
801 key: :attachment_links,
802 type: :boolean,
803 description: "Enable to automatically add attachment link text to statuses"
804 },
805 %{
806 key: :welcome_message,
807 type: :string,
808 description:
809 "A message that will be sent to a newly registered users as a direct message",
810 suggestions: [
811 "Hi, @username! Welcome on board!"
812 ]
813 },
814 %{
815 key: :welcome_user_nickname,
816 type: :string,
817 description: "The nickname of the local user that sends the welcome message",
818 suggestions: [
819 "lain"
820 ]
821 },
822 %{
823 key: :max_report_comment_size,
824 type: :integer,
825 description: "The maximum size of the report comment. Default: 1000.",
826 suggestions: [
827 1_000
828 ]
829 },
830 %{
831 key: :safe_dm_mentions,
832 type: :boolean,
833 description:
834 "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
835 " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
836 " Default: disabled"
837 },
838 %{
839 key: :healthcheck,
840 type: :boolean,
841 description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`"
842 },
843 %{
844 key: :remote_post_retention_days,
845 type: :integer,
846 description:
847 "The default amount of days to retain remote posts when pruning the database",
848 suggestions: [
849 90
850 ]
851 },
852 %{
853 key: :user_bio_length,
854 type: :integer,
855 description: "A user bio maximum length. Default: 5000.",
856 suggestions: [
857 5_000
858 ]
859 },
860 %{
861 key: :user_name_length,
862 type: :integer,
863 description: "A user name maximum length. Default: 100.",
864 suggestions: [
865 100
866 ]
867 },
868 %{
869 key: :skip_thread_containment,
870 type: :boolean,
871 description: "Skip filtering out broken threads. Default: enabled"
872 },
873 %{
874 key: :limit_to_local_content,
875 type: {:dropdown, :atom},
876 description:
877 "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
878 suggestions: [
879 :unauthenticated,
880 :all,
881 false
882 ]
883 },
884 %{
885 key: :max_account_fields,
886 type: :integer,
887 description: "The maximum number of custom fields in the user profile. Default: 10.",
888 suggestions: [
889 10
890 ]
891 },
892 %{
893 key: :max_remote_account_fields,
894 type: :integer,
895 description:
896 "The maximum number of custom fields in the remote user profile. Default: 20.",
897 suggestions: [
898 20
899 ]
900 },
901 %{
902 key: :account_field_name_length,
903 type: :integer,
904 description: "An account field name maximum length. Default: 512.",
905 suggestions: [
906 512
907 ]
908 },
909 %{
910 key: :account_field_value_length,
911 type: :integer,
912 description: "An account field value maximum length. Default: 2048.",
913 suggestions: [
914 2048
915 ]
916 },
917 %{
918 key: :external_user_synchronization,
919 type: :boolean,
920 description: "Enabling following/followers counters synchronization for external users"
921 },
922 %{
923 key: :multi_factor_authentication,
924 type: :keyword,
925 description: "Multi-factor authentication settings",
926 suggestions: [
927 [
928 totp: [digits: 6, period: 30],
929 backup_codes: [number: 5, length: 16]
930 ]
931 ],
932 children: [
933 %{
934 key: :totp,
935 type: :keyword,
936 description: "TOTP settings",
937 suggestions: [digits: 6, period: 30],
938 children: [
939 %{
940 key: :digits,
941 type: :integer,
942 suggestions: [6],
943 description:
944 "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
945 },
946 %{
947 key: :period,
948 type: :integer,
949 suggestions: [30],
950 description:
951 "a period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
952 }
953 ]
954 },
955 %{
956 key: :backup_codes,
957 type: :keyword,
958 description: "MFA backup codes settings",
959 suggestions: [number: 5, length: 16],
960 children: [
961 %{
962 key: :number,
963 type: :integer,
964 suggestions: [5],
965 description: "number of backup codes to generate."
966 },
967 %{
968 key: :length,
969 type: :integer,
970 suggestions: [16],
971 description:
972 "Determines the length of backup one-time pass-codes, in characters. Defaults to 16 characters."
973 }
974 ]
975 }
976 ]
977 },
978 %{
979 key: :instance_thumbnail,
980 type: :string,
981 description:
982 "The instance thumbnail image. It will appear in [Pleroma Instances](http://distsn.org/pleroma-instances.html)",
983 suggestions: ["/instance/thumbnail.jpeg"]
984 }
985 ]
986 },
987 %{
988 group: :logger,
989 type: :group,
990 description: "Logger-related settings",
991 children: [
992 %{
993 key: :backends,
994 type: [:atom, :tuple, :module],
995 description:
996 "Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
997 suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]
998 }
999 ]
1000 },
1001 %{
1002 group: :logger,
1003 type: :group,
1004 key: :ex_syslogger,
1005 description: "ExSyslogger-related settings",
1006 children: [
1007 %{
1008 key: :level,
1009 type: {:dropdown, :atom},
1010 description: "Log level",
1011 suggestions: [:debug, :info, :warn, :error]
1012 },
1013 %{
1014 key: :ident,
1015 type: :string,
1016 description:
1017 "A string that's prepended to every message, and is typically set to the app name",
1018 suggestions: ["pleroma"]
1019 },
1020 %{
1021 key: :format,
1022 type: :string,
1023 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\".",
1024 suggestions: ["$metadata[$level] $message"]
1025 },
1026 %{
1027 key: :metadata,
1028 type: {:list, :atom},
1029 suggestions: [:request_id]
1030 }
1031 ]
1032 },
1033 %{
1034 group: :logger,
1035 type: :group,
1036 key: :console,
1037 description: "Console logger settings",
1038 children: [
1039 %{
1040 key: :level,
1041 type: {:dropdown, :atom},
1042 description: "Log level",
1043 suggestions: [:debug, :info, :warn, :error]
1044 },
1045 %{
1046 key: :format,
1047 type: :string,
1048 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\".",
1049 suggestions: ["$metadata[$level] $message"]
1050 },
1051 %{
1052 key: :metadata,
1053 type: {:list, :atom},
1054 suggestions: [:request_id]
1055 }
1056 ]
1057 },
1058 %{
1059 group: :quack,
1060 type: :group,
1061 description: "Quack-related settings",
1062 children: [
1063 %{
1064 key: :level,
1065 type: {:dropdown, :atom},
1066 description: "Log level",
1067 suggestions: [:debug, :info, :warn, :error]
1068 },
1069 %{
1070 key: :meta,
1071 type: {:list, :atom},
1072 description: "Configure which metadata you want to report on",
1073 suggestions: [
1074 :application,
1075 :module,
1076 :file,
1077 :function,
1078 :line,
1079 :pid,
1080 :crash_reason,
1081 :initial_call,
1082 :registered_name,
1083 :all,
1084 :none
1085 ]
1086 },
1087 %{
1088 key: :webhook_url,
1089 type: :string,
1090 description: "Configure the Slack incoming webhook",
1091 suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
1092 }
1093 ]
1094 },
1095 %{
1096 group: :pleroma,
1097 key: :frontend_configurations,
1098 type: :group,
1099 description:
1100 "This form can be used to configure a keyword list that keeps the configuration data for any " <>
1101 "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <>
1102 "add your own configuration your settings all fields must be complete.",
1103 children: [
1104 %{
1105 key: :pleroma_fe,
1106 label: "Pleroma FE",
1107 type: :map,
1108 description: "Settings for Pleroma FE",
1109 suggestions: [
1110 %{
1111 alwaysShowSubjectInput: true,
1112 background: "/static/aurora_borealis.jpg",
1113 collapseMessageWithSubject: false,
1114 disableChat: false,
1115 greentext: false,
1116 hideFilteredStatuses: false,
1117 hideMutedPosts: false,
1118 hidePostStats: false,
1119 hideSitename: false,
1120 hideUserStats: false,
1121 loginMethod: "password",
1122 logo: "/static/logo.png",
1123 logoMargin: ".1em",
1124 logoMask: true,
1125 minimalScopesMode: false,
1126 noAttachmentLinks: false,
1127 nsfwCensorImage: "/static/img/nsfw.74818f9.png",
1128 postContentType: "text/plain",
1129 redirectRootLogin: "/main/friends",
1130 redirectRootNoLogin: "/main/all",
1131 scopeCopy: true,
1132 sidebarRight: false,
1133 showFeaturesPanel: true,
1134 showInstanceSpecificPanel: false,
1135 subjectLineBehavior: "email",
1136 theme: "pleroma-dark",
1137 webPushNotifications: false
1138 }
1139 ],
1140 children: [
1141 %{
1142 key: :alwaysShowSubjectInput,
1143 label: "Always show subject input",
1144 type: :boolean,
1145 description: "When disabled, auto-hide the subject field if it's empty"
1146 },
1147 %{
1148 key: :background,
1149 type: :string,
1150 description:
1151 "URL of the background, unless viewing a user profile with a background that is set",
1152 suggestions: ["/images/city.jpg"]
1153 },
1154 %{
1155 key: :collapseMessageWithSubject,
1156 label: "Collapse message with subject",
1157 type: :boolean,
1158 description:
1159 "When a message has a subject (aka Content Warning), collapse it by default"
1160 },
1161 %{
1162 key: :disableChat,
1163 label: "PleromaFE Chat",
1164 type: :boolean,
1165 description: "Disables PleromaFE Chat component"
1166 },
1167 %{
1168 key: :greentext,
1169 label: "Greentext",
1170 type: :boolean,
1171 description: "Enables green text on lines prefixed with the > character."
1172 },
1173 %{
1174 key: :hideFilteredStatuses,
1175 label: "Hide Filtered Statuses",
1176 type: :boolean,
1177 description: "Hides filtered statuses from timelines."
1178 },
1179 %{
1180 key: :hideMutedPosts,
1181 label: "Hide Muted Posts",
1182 type: :boolean,
1183 description: "Hides muted statuses from timelines."
1184 },
1185 %{
1186 key: :hidePostStats,
1187 label: "Hide post stats",
1188 type: :boolean,
1189 description: "Hide notices statistics (repeats, favorites, ...)"
1190 },
1191 %{
1192 key: :hideSitename,
1193 label: "Hide Sitename",
1194 type: :boolean,
1195 description: "Hides instance name from PleromaFE banner."
1196 },
1197 %{
1198 key: :hideUserStats,
1199 label: "Hide user stats",
1200 type: :boolean,
1201 description:
1202 "Hide profile statistics (posts, posts per day, followers, followings, ...)"
1203 },
1204 %{
1205 key: :logo,
1206 type: :string,
1207 description: "URL of the logo, defaults to Pleroma's logo",
1208 suggestions: ["/static/logo.png"]
1209 },
1210 %{
1211 key: :logoMargin,
1212 label: "Logo margin",
1213 type: :string,
1214 description:
1215 "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
1216 "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
1217 suggestions: [".1em"]
1218 },
1219 %{
1220 key: :logoMask,
1221 label: "Logo mask",
1222 type: :boolean,
1223 description:
1224 "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <>
1225 "If you want a colorful logo you must disable logoMask."
1226 },
1227 %{
1228 key: :minimalScopesMode,
1229 label: "Minimal scopes mode",
1230 type: :boolean,
1231 description:
1232 "Limit scope selection to Direct, User default, and Scope of post replying to. " <>
1233 "Also prevents replying to a DM with a public post from PleromaFE."
1234 },
1235 %{
1236 key: :nsfwCensorImage,
1237 label: "NSFW Censor Image",
1238 type: :string,
1239 description:
1240 "URL of the image to use for hiding NSFW media attachments in the timeline.",
1241 suggestions: ["/static/img/nsfw.74818f9.png"]
1242 },
1243 %{
1244 key: :postContentType,
1245 label: "Post Content Type",
1246 type: {:dropdown, :atom},
1247 description: "Default post formatting option.",
1248 suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"]
1249 },
1250 %{
1251 key: :redirectRootNoLogin,
1252 label: "Redirect root no login",
1253 type: :string,
1254 description:
1255 "Relative URL which indicates where to redirect when a user isn't logged in",
1256 suggestions: ["/main/all"]
1257 },
1258 %{
1259 key: :redirectRootLogin,
1260 label: "Redirect root login",
1261 type: :string,
1262 description:
1263 "Relative URL which indicates where to redirect when a user is logged in",
1264 suggestions: ["/main/friends"]
1265 },
1266 %{
1267 key: :scopeCopy,
1268 label: "Scope copy",
1269 type: :boolean,
1270 description: "Copy the scope (private/unlisted/public) in replies to posts by default"
1271 },
1272 %{
1273 key: :sidebarRight,
1274 label: "Sidebar on Right",
1275 type: :boolean,
1276 description: "Change alignment of sidebar and panels to the right."
1277 },
1278 %{
1279 key: :showFeaturesPanel,
1280 label: "Show instance features panel",
1281 type: :boolean,
1282 description:
1283 "Enables panel displaying functionality of the instance on the About page."
1284 },
1285 %{
1286 key: :showInstanceSpecificPanel,
1287 label: "Show instance specific panel",
1288 type: :boolean,
1289 description: "Whether to show the instance's custom panel"
1290 },
1291 %{
1292 key: :subjectLineBehavior,
1293 label: "Subject line behavior",
1294 type: :string,
1295 description: "Allows changing the default behaviour of subject lines in replies.
1296 `email`: copy and preprend re:, as in email,
1297 `masto`: copy verbatim, as in Mastodon,
1298 `noop`: don't copy the subject.",
1299 suggestions: ["email", "masto", "noop"]
1300 },
1301 %{
1302 key: :theme,
1303 type: :string,
1304 description: "Which theme to use. Available themes are defined in styles.json",
1305 suggestions: ["pleroma-dark"]
1306 }
1307 ]
1308 },
1309 %{
1310 key: :masto_fe,
1311 label: "Masto FE",
1312 type: :map,
1313 description: "Settings for Masto FE",
1314 suggestions: [
1315 %{
1316 showInstanceSpecificPanel: true
1317 }
1318 ],
1319 children: [
1320 %{
1321 key: :showInstanceSpecificPanel,
1322 label: "Show instance specific panel",
1323 type: :boolean,
1324 description: "Whenether to show the instance's specific panel"
1325 }
1326 ]
1327 }
1328 ]
1329 },
1330 %{
1331 group: :pleroma,
1332 key: :assets,
1333 type: :group,
1334 description:
1335 "This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
1336 children: [
1337 %{
1338 key: :mascots,
1339 type: {:keyword, :map},
1340 description:
1341 "Keyword of mascots, each element must contain both an url and a mime_type key",
1342 suggestions: [
1343 pleroma_fox_tan: %{
1344 url: "/images/pleroma-fox-tan-smol.png",
1345 mime_type: "image/png"
1346 },
1347 pleroma_fox_tan_shy: %{
1348 url: "/images/pleroma-fox-tan-shy.png",
1349 mime_type: "image/png"
1350 }
1351 ]
1352 },
1353 %{
1354 key: :default_mascot,
1355 type: :atom,
1356 description:
1357 "This will be used as the default mascot on MastoFE. Default: `:pleroma_fox_tan`",
1358 suggestions: [
1359 :pleroma_fox_tan
1360 ]
1361 },
1362 %{
1363 key: :default_user_avatar,
1364 type: :string,
1365 description: "URL of the default user avatar.",
1366 suggestions: ["/images/avi.png"]
1367 }
1368 ]
1369 },
1370 %{
1371 group: :pleroma,
1372 key: :manifest,
1373 type: :group,
1374 description:
1375 "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE",
1376 children: [
1377 %{
1378 key: :icons,
1379 type: {:list, :map},
1380 description: "Describe the icons of the app",
1381 suggestion: [
1382 %{
1383 src: "/static/logo.png"
1384 },
1385 %{
1386 src: "/static/icon.png",
1387 type: "image/png"
1388 },
1389 %{
1390 src: "/static/icon.ico",
1391 sizes: "72x72 96x96 128x128 256x256"
1392 }
1393 ]
1394 },
1395 %{
1396 key: :theme_color,
1397 type: :string,
1398 description: "Describe the theme color of the app",
1399 suggestions: ["#282c37", "mediumpurple"]
1400 },
1401 %{
1402 key: :background_color,
1403 type: :string,
1404 description: "Describe the background color of the app",
1405 suggestions: ["#191b22", "aliceblue"]
1406 }
1407 ]
1408 },
1409 %{
1410 group: :pleroma,
1411 key: :mrf_simple,
1412 label: "MRF simple",
1413 type: :group,
1414 description: "Message Rewrite Facility",
1415 children: [
1416 %{
1417 key: :media_removal,
1418 type: {:list, :string},
1419 description: "List of instances to strip media attachments from",
1420 suggestions: ["example.com", "*.example.com"]
1421 },
1422 %{
1423 key: :media_nsfw,
1424 label: "Media NSFW",
1425 type: {:list, :string},
1426 description: "List of instances to tag all media as NSFW (sensitive) from",
1427 suggestions: ["example.com", "*.example.com"]
1428 },
1429 %{
1430 key: :federated_timeline_removal,
1431 type: {:list, :string},
1432 description:
1433 "List of instances to remove from Federated (aka The Whole Known Network) Timeline",
1434 suggestions: ["example.com", "*.example.com"]
1435 },
1436 %{
1437 key: :reject,
1438 type: {:list, :string},
1439 description: "List of instances to reject activities from (except deletes)",
1440 suggestions: ["example.com", "*.example.com"]
1441 },
1442 %{
1443 key: :accept,
1444 type: {:list, :string},
1445 description: "List of instances to only accept activities from (except deletes)",
1446 suggestions: ["example.com", "*.example.com"]
1447 },
1448 %{
1449 key: :report_removal,
1450 type: {:list, :string},
1451 description: "List of instances to reject reports from",
1452 suggestions: ["example.com", "*.example.com"]
1453 },
1454 %{
1455 key: :avatar_removal,
1456 type: {:list, :string},
1457 description: "List of instances to strip avatars from",
1458 suggestions: ["example.com", "*.example.com"]
1459 },
1460 %{
1461 key: :banner_removal,
1462 type: {:list, :string},
1463 description: "List of instances to strip banners from",
1464 suggestions: ["example.com", "*.example.com"]
1465 },
1466 %{
1467 key: :reject_deletes,
1468 type: {:list, :string},
1469 description: "List of instances to reject deletions from",
1470 suggestions: ["example.com", "*.example.com"]
1471 }
1472 ]
1473 },
1474 %{
1475 group: :pleroma,
1476 key: :mrf_activity_expiration,
1477 label: "MRF Activity Expiration Policy",
1478 type: :group,
1479 description: "Adds expiration to all local Create Note activities",
1480 children: [
1481 %{
1482 key: :days,
1483 type: :integer,
1484 description: "Default global expiration time for all local Create activities (in days)",
1485 suggestions: [90, 365]
1486 }
1487 ]
1488 },
1489 %{
1490 group: :pleroma,
1491 key: :mrf_subchain,
1492 label: "MRF subchain",
1493 type: :group,
1494 description:
1495 "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <>
1496 " All criteria are configured as a map of regular expressions to lists of policy modules.",
1497 children: [
1498 %{
1499 key: :match_actor,
1500 type: :map,
1501 description: "Matches a series of regular expressions against the actor field",
1502 suggestions: [
1503 %{
1504 ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy]
1505 }
1506 ]
1507 }
1508 ]
1509 },
1510 %{
1511 group: :pleroma,
1512 key: :mrf_rejectnonpublic,
1513 description:
1514 "MRF RejectNonPublic settings. RejectNonPublic drops posts with non-public visibility settings.",
1515 label: "MRF reject non public",
1516 type: :group,
1517 children: [
1518 %{
1519 key: :allow_followersonly,
1520 label: "Allow followers-only",
1521 type: :boolean,
1522 description: "Whether to allow followers-only posts"
1523 },
1524 %{
1525 key: :allow_direct,
1526 type: :boolean,
1527 description: "Whether to allow direct messages"
1528 }
1529 ]
1530 },
1531 %{
1532 group: :pleroma,
1533 key: :mrf_hellthread,
1534 label: "MRF hellthread",
1535 type: :group,
1536 description: "Block messages with too much mentions",
1537 children: [
1538 %{
1539 key: :delist_threshold,
1540 type: :integer,
1541 description:
1542 "Number of mentioned users after which the message gets delisted (the message can still be seen, " <>
1543 " but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable.",
1544 suggestions: [10]
1545 },
1546 %{
1547 key: :reject_threshold,
1548 type: :integer,
1549 description:
1550 "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.",
1551 suggestions: [20]
1552 }
1553 ]
1554 },
1555 %{
1556 group: :pleroma,
1557 key: :mrf_keyword,
1558 label: "MRF keyword",
1559 type: :group,
1560 description: "Reject or Word-Replace messages with a keyword or regex",
1561 children: [
1562 %{
1563 key: :reject,
1564 type: [:string, :regex],
1565 description:
1566 "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.",
1567 suggestions: ["foo", ~r/foo/iu]
1568 },
1569 %{
1570 key: :federated_timeline_removal,
1571 type: [:string, :regex],
1572 description:
1573 "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.",
1574 suggestions: ["foo", ~r/foo/iu]
1575 },
1576 %{
1577 key: :replace,
1578 type: [{:tuple, :string, :string}, {:tuple, :regex, :string}],
1579 description:
1580 "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.",
1581 suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}]
1582 }
1583 ]
1584 },
1585 %{
1586 group: :pleroma,
1587 key: :mrf_mention,
1588 label: "MRF mention",
1589 type: :group,
1590 description: "Block messages which mention a user",
1591 children: [
1592 %{
1593 key: :actors,
1594 type: {:list, :string},
1595 description: "A list of actors for which any post mentioning them will be dropped.",
1596 suggestions: ["actor1", "actor2"]
1597 }
1598 ]
1599 },
1600 %{
1601 group: :pleroma,
1602 key: :mrf_vocabulary,
1603 label: "MRF vocabulary",
1604 type: :group,
1605 description: "Filter messages which belong to certain activity vocabularies",
1606 children: [
1607 %{
1608 key: :accept,
1609 type: {:list, :string},
1610 description:
1611 "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted",
1612 suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
1613 },
1614 %{
1615 key: :reject,
1616 type: {:list, :string},
1617 description:
1618 "A list of ActivityStreams terms to reject. If empty, no messages are rejected",
1619 suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
1620 }
1621 ]
1622 },
1623 # %{
1624 # group: :pleroma,
1625 # key: :mrf_user_allowlist,
1626 # type: :map,
1627 # description:
1628 # "The keys in this section are the domain names that the policy should apply to." <>
1629 # " Each key should be assigned a list of users that should be allowed through by their ActivityPub ID",
1630 # suggestions: [
1631 # %{"example.org" => ["https://example.org/users/admin"]}
1632 # ]
1633 # ]
1634 # },
1635 %{
1636 group: :pleroma,
1637 key: :media_proxy,
1638 type: :group,
1639 description: "Media proxy",
1640 children: [
1641 %{
1642 key: :enabled,
1643 type: :boolean,
1644 description: "Enables proxying of remote media to the instance's proxy"
1645 },
1646 %{
1647 key: :base_url,
1648 type: :string,
1649 description:
1650 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1651 suggestions: ["https://example.com"]
1652 },
1653 %{
1654 key: :invalidation,
1655 type: :keyword,
1656 descpiption: "",
1657 suggestions: [
1658 enabled: true,
1659 provider: Pleroma.Web.MediaProxy.Invalidation.Script
1660 ],
1661 children: [
1662 %{
1663 key: :enabled,
1664 type: :boolean,
1665 description: "Enables invalidate media cache"
1666 },
1667 %{
1668 key: :provider,
1669 type: :module,
1670 description: "Module which will be used to cache purge.",
1671 suggestions: [
1672 Pleroma.Web.MediaProxy.Invalidation.Script,
1673 Pleroma.Web.MediaProxy.Invalidation.Http
1674 ]
1675 }
1676 ]
1677 },
1678 %{
1679 key: :proxy_opts,
1680 type: :keyword,
1681 description: "Options for Pleroma.ReverseProxy",
1682 suggestions: [
1683 redirect_on_failure: false,
1684 max_body_length: 25 * 1_048_576,
1685 http: [
1686 follow_redirect: true,
1687 pool: :media
1688 ]
1689 ],
1690 children: [
1691 %{
1692 key: :redirect_on_failure,
1693 type: :boolean,
1694 description:
1695 "Redirects the client to the real remote URL if there's any HTTP errors. " <>
1696 "Any error during body processing will not be redirected as the response is chunked."
1697 },
1698 %{
1699 key: :max_body_length,
1700 type: :integer,
1701 description:
1702 "Limits the content length to be approximately the " <>
1703 "specified length. It is validated with the `content-length` header and also verified when proxying."
1704 },
1705 %{
1706 key: :http,
1707 type: :keyword,
1708 description: "HTTP options",
1709 children: [
1710 %{
1711 key: :adapter,
1712 type: :keyword,
1713 description: "Adapter specific options",
1714 children: [
1715 %{
1716 key: :ssl_options,
1717 type: :keyword,
1718 label: "SSL Options",
1719 description: "SSL options for HTTP adapter",
1720 children: [
1721 %{
1722 key: :versions,
1723 type: {:list, :atom},
1724 description: "List of TLS version to use",
1725 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
1726 }
1727 ]
1728 }
1729 ]
1730 },
1731 %{
1732 key: :proxy_url,
1733 label: "Proxy URL",
1734 type: [:string, :tuple],
1735 description: "Proxy URL",
1736 suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
1737 }
1738 ]
1739 }
1740 ]
1741 },
1742 %{
1743 key: :whitelist,
1744 type: {:list, :string},
1745 description: "List of domains to bypass the mediaproxy",
1746 suggestions: ["example.com"]
1747 }
1748 ]
1749 },
1750 %{
1751 group: :pleroma,
1752 key: Pleroma.Web.MediaProxy.Invalidation.Http,
1753 type: :group,
1754 description: "HTTP invalidate settings",
1755 children: [
1756 %{
1757 key: :method,
1758 type: :atom,
1759 description: "HTTP method of request. Default: :purge"
1760 },
1761 %{
1762 key: :headers,
1763 type: {:list, :tuple},
1764 description: "HTTP headers of request.",
1765 suggestions: [{"x-refresh", 1}]
1766 },
1767 %{
1768 key: :options,
1769 type: :keyword,
1770 description: "Request options.",
1771 suggestions: [params: %{ts: "xxx"}]
1772 }
1773 ]
1774 },
1775 %{
1776 group: :pleroma,
1777 key: Pleroma.Web.MediaProxy.Invalidation.Script,
1778 type: :group,
1779 description: "Script invalidate settings",
1780 children: [
1781 %{
1782 key: :script_path,
1783 type: :string,
1784 description: "Path to shell script. Which will run purge cache.",
1785 suggestions: ["./installation/nginx-cache-purge.sh.example"]
1786 }
1787 ]
1788 },
1789 %{
1790 group: :pleroma,
1791 key: :gopher,
1792 type: :group,
1793 description: "Gopher settings",
1794 children: [
1795 %{
1796 key: :enabled,
1797 type: :boolean,
1798 description: "Enables the gopher interface"
1799 },
1800 %{
1801 key: :ip,
1802 type: :tuple,
1803 description: "IP address to bind to",
1804 suggestions: [{0, 0, 0, 0}]
1805 },
1806 %{
1807 key: :port,
1808 type: :integer,
1809 description: "Port to bind to",
1810 suggestions: [9999]
1811 },
1812 %{
1813 key: :dstport,
1814 type: :integer,
1815 description: "Port advertised in urls (optional, defaults to port)",
1816 suggestions: [9999]
1817 }
1818 ]
1819 },
1820 %{
1821 group: :pleroma,
1822 key: :activitypub,
1823 type: :group,
1824 description: "ActivityPub-related settings",
1825 children: [
1826 %{
1827 key: :unfollow_blocked,
1828 type: :boolean,
1829 description: "Whether blocks result in people getting unfollowed"
1830 },
1831 %{
1832 key: :outgoing_blocks,
1833 type: :boolean,
1834 description: "Whether to federate blocks to other instances"
1835 },
1836 %{
1837 key: :sign_object_fetches,
1838 type: :boolean,
1839 description: "Sign object fetches with HTTP signatures"
1840 },
1841 %{
1842 key: :note_replies_output_limit,
1843 type: :integer,
1844 description:
1845 "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)."
1846 },
1847 %{
1848 key: :follow_handshake_timeout,
1849 type: :integer,
1850 description: "Following handshake timeout",
1851 suggestions: [500]
1852 }
1853 ]
1854 },
1855 %{
1856 group: :pleroma,
1857 key: :http_security,
1858 type: :group,
1859 description: "HTTP security settings",
1860 children: [
1861 %{
1862 key: :enabled,
1863 type: :boolean,
1864 description: "Whether the managed content security policy is enabled"
1865 },
1866 %{
1867 key: :sts,
1868 label: "STS",
1869 type: :boolean,
1870 description: "Whether to additionally send a Strict-Transport-Security header"
1871 },
1872 %{
1873 key: :sts_max_age,
1874 label: "STS max age",
1875 type: :integer,
1876 description: "The maximum age for the Strict-Transport-Security header if sent",
1877 suggestions: [31_536_000]
1878 },
1879 %{
1880 key: :ct_max_age,
1881 label: "CT max age",
1882 type: :integer,
1883 description: "The maximum age for the Expect-CT header if sent",
1884 suggestions: [2_592_000]
1885 },
1886 %{
1887 key: :referrer_policy,
1888 type: :string,
1889 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1890 suggestions: ["same-origin", "no-referrer"]
1891 },
1892 %{
1893 key: :report_uri,
1894 label: "Report URI",
1895 type: :string,
1896 description: "Adds the specified url to report-uri and report-to group in CSP header",
1897 suggestions: ["https://example.com/report-uri"]
1898 }
1899 ]
1900 },
1901 %{
1902 group: :web_push_encryption,
1903 key: :vapid_details,
1904 type: :group,
1905 description:
1906 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it",
1907 children: [
1908 %{
1909 key: :subject,
1910 type: :string,
1911 description:
1912 "A mailto link for the administrative contact." <>
1913 " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
1914 suggestions: ["mailto:moderators@pleroma.com"]
1915 },
1916 %{
1917 key: :public_key,
1918 type: :string,
1919 description: "VAPID public key",
1920 suggestions: ["Public key"]
1921 },
1922 %{
1923 key: :private_key,
1924 type: :string,
1925 description: "VAPID private key",
1926 suggestions: ["Private key"]
1927 }
1928 ]
1929 },
1930 %{
1931 group: :pleroma,
1932 key: Pleroma.Captcha,
1933 type: :group,
1934 description: "Captcha-related settings",
1935 children: [
1936 %{
1937 key: :enabled,
1938 type: :boolean,
1939 description: "Whether the captcha should be shown on registration"
1940 },
1941 %{
1942 key: :method,
1943 type: :module,
1944 description: "The method/service to use for captcha",
1945 suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
1946 },
1947 %{
1948 key: :seconds_valid,
1949 type: :integer,
1950 description: "The time in seconds for which the captcha is valid",
1951 suggestions: [60]
1952 }
1953 ]
1954 },
1955 %{
1956 group: :pleroma,
1957 key: Pleroma.Captcha.Kocaptcha,
1958 type: :group,
1959 description:
1960 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1961 " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
1962 children: [
1963 %{
1964 key: :endpoint,
1965 type: :string,
1966 description: "The kocaptcha endpoint to use",
1967 suggestions: ["https://captcha.kotobank.ch"]
1968 }
1969 ]
1970 },
1971 %{
1972 group: :pleroma,
1973 type: :group,
1974 description:
1975 "Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the `admin_token` parameter",
1976 children: [
1977 %{
1978 key: :admin_token,
1979 type: :string,
1980 description: "Token",
1981 suggestions: ["We recommend a secure random string or UUID"]
1982 }
1983 ]
1984 },
1985 %{
1986 group: :pleroma,
1987 key: Oban,
1988 type: :group,
1989 description: """
1990 [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.
1991
1992 Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1),
1993 it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`,
1994 otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings
1995 (see https://github.com/sorentwo/oban/issues/52).
1996 """,
1997 children: [
1998 %{
1999 key: :verbose,
2000 type: {:dropdown, :atom},
2001 description: "Logs verbose mode",
2002 suggestions: [false, :error, :warn, :info, :debug]
2003 },
2004 %{
2005 key: :prune,
2006 type: [:atom, :tuple],
2007 description:
2008 "Non-retryable jobs [pruning settings](https://github.com/sorentwo/oban#pruning)",
2009 suggestions: [:disabled, {:maxlen, 1500}, {:maxage, 60 * 60}]
2010 },
2011 %{
2012 key: :queues,
2013 type: {:keyword, :integer},
2014 description:
2015 "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
2016 suggestions: [
2017 activity_expiration: 10,
2018 attachments_cleanup: 5,
2019 background: 5,
2020 federator_incoming: 50,
2021 federator_outgoing: 50,
2022 mailer: 10,
2023 scheduled_activities: 10,
2024 transmogrifier: 20,
2025 web_push: 50
2026 ],
2027 children: [
2028 %{
2029 key: :activity_expiration,
2030 type: :integer,
2031 description: "Activity expiration queue",
2032 suggestions: [10]
2033 },
2034 %{
2035 key: :attachments_cleanup,
2036 type: :integer,
2037 description: "Attachment deletion queue",
2038 suggestions: [5]
2039 },
2040 %{
2041 key: :background,
2042 type: :integer,
2043 description: "Background queue",
2044 suggestions: [5]
2045 },
2046 %{
2047 key: :federator_incoming,
2048 type: :integer,
2049 description: "Incoming federation queue",
2050 suggestions: [50]
2051 },
2052 %{
2053 key: :federator_outgoing,
2054 type: :integer,
2055 description: "Outgoing federation queue",
2056 suggestions: [50]
2057 },
2058 %{
2059 key: :mailer,
2060 type: :integer,
2061 description: "Email sender queue, see Pleroma.Emails.Mailer",
2062 suggestions: [10]
2063 },
2064 %{
2065 key: :scheduled_activities,
2066 type: :integer,
2067 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
2068 suggestions: [10]
2069 },
2070 %{
2071 key: :transmogrifier,
2072 type: :integer,
2073 description: "Transmogrifier queue",
2074 suggestions: [20]
2075 },
2076 %{
2077 key: :web_push,
2078 type: :integer,
2079 description: "Web push notifications queue",
2080 suggestions: [50]
2081 }
2082 ]
2083 },
2084 %{
2085 key: :crontab,
2086 type: {:list, :tuple},
2087 description: "Settings for cron background jobs",
2088 suggestions: [
2089 {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker},
2090 {"0 * * * *", Pleroma.Workers.Cron.StatsWorker},
2091 {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker},
2092 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
2093 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
2094 ]
2095 }
2096 ]
2097 },
2098 %{
2099 group: :pleroma,
2100 key: :workers,
2101 type: :group,
2102 description: "Includes custom worker options not interpretable directly by `Oban`",
2103 children: [
2104 %{
2105 key: :retries,
2106 type: {:keyword, :integer},
2107 description: "Max retry attempts for failed jobs, per `Oban` queue",
2108 suggestions: [
2109 federator_incoming: 5,
2110 federator_outgoing: 5
2111 ]
2112 }
2113 ]
2114 },
2115 %{
2116 group: :pleroma,
2117 key: Pleroma.Web.Metadata,
2118 type: :group,
2119 description: "Metadata-related settings",
2120 children: [
2121 %{
2122 key: :providers,
2123 type: {:list, :module},
2124 description: "List of metadata providers to enable",
2125 suggestions: [
2126 Pleroma.Web.Metadata.Providers.OpenGraph,
2127 Pleroma.Web.Metadata.Providers.TwitterCard,
2128 Pleroma.Web.Metadata.Providers.RelMe,
2129 Pleroma.Web.Metadata.Providers.Feed
2130 ]
2131 },
2132 %{
2133 key: :unfurl_nsfw,
2134 label: "Unfurl NSFW",
2135 type: :boolean,
2136 description: "When enabled NSFW attachments will be shown in previews"
2137 }
2138 ]
2139 },
2140 %{
2141 group: :pleroma,
2142 key: :rich_media,
2143 type: :group,
2144 description:
2145 "If enabled the instance will parse metadata from attached links to generate link previews.",
2146 children: [
2147 %{
2148 key: :enabled,
2149 type: :boolean,
2150 description: "Enables RichMedia parsing of URLs."
2151 },
2152 %{
2153 key: :ignore_hosts,
2154 type: {:list, :string},
2155 description: "List of hosts which will be ignored by the metadata parser.",
2156 suggestions: ["accounts.google.com", "xss.website"]
2157 },
2158 %{
2159 key: :ignore_tld,
2160 label: "Ignore TLD",
2161 type: {:list, :string},
2162 description: "List TLDs (top-level domains) which will ignore for parse metadata.",
2163 suggestions: ["local", "localdomain", "lan"]
2164 },
2165 %{
2166 key: :parsers,
2167 type: {:list, :module},
2168 description:
2169 "List of Rich Media parsers. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parsers.` part), but on adding custom module you need to use full name.",
2170 suggestions: [
2171 Pleroma.Web.RichMedia.Parsers.MetaTagsParser,
2172 Pleroma.Web.RichMedia.Parsers.OEmbed,
2173 Pleroma.Web.RichMedia.Parsers.OGP,
2174 Pleroma.Web.RichMedia.Parsers.TwitterCard
2175 ]
2176 },
2177 %{
2178 key: :ttl_setters,
2179 label: "TTL setters",
2180 type: {:list, :module},
2181 description:
2182 "List of rich media TTL setters. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parser.` part), but on adding custom module you need to use full name.",
2183 suggestions: [
2184 Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2185 ]
2186 }
2187 ]
2188 },
2189 %{
2190 group: :auto_linker,
2191 key: :opts,
2192 type: :group,
2193 description: "Configuration for the auto_linker library",
2194 children: [
2195 %{
2196 key: :class,
2197 type: [:string, false],
2198 description: "Specify the class to be added to the generated link. Disable to clear",
2199 suggestions: ["auto-linker", false]
2200 },
2201 %{
2202 key: :rel,
2203 type: [:string, false],
2204 description: "Override the rel attribute. Disable to clear",
2205 suggestions: ["ugc", "noopener noreferrer", false]
2206 },
2207 %{
2208 key: :new_window,
2209 type: :boolean,
2210 description: "Link urls will open in new window/tab"
2211 },
2212 %{
2213 key: :truncate,
2214 type: [:integer, false],
2215 description:
2216 "Set to a number to truncate urls longer then the number. Truncated urls will end in `..`",
2217 suggestions: [15, false]
2218 },
2219 %{
2220 key: :strip_prefix,
2221 type: :boolean,
2222 description: "Strip the scheme prefix"
2223 },
2224 %{
2225 key: :extra,
2226 type: :boolean,
2227 description: "Link urls with rarely used schemes (magnet, ipfs, irc, etc.)"
2228 }
2229 ]
2230 },
2231 %{
2232 group: :pleroma,
2233 key: Pleroma.ScheduledActivity,
2234 type: :group,
2235 description: "Scheduled activities settings",
2236 children: [
2237 %{
2238 key: :daily_user_limit,
2239 type: :integer,
2240 description:
2241 "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2242 suggestions: [25]
2243 },
2244 %{
2245 key: :total_user_limit,
2246 type: :integer,
2247 description:
2248 "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2249 suggestions: [300]
2250 },
2251 %{
2252 key: :enabled,
2253 type: :boolean,
2254 description: "Whether scheduled activities are sent to the job queue to be executed"
2255 }
2256 ]
2257 },
2258 %{
2259 group: :pleroma,
2260 key: Pleroma.ActivityExpiration,
2261 type: :group,
2262 description: "Expired activity settings",
2263 children: [
2264 %{
2265 key: :enabled,
2266 type: :boolean,
2267 description: "Whether expired activities will be sent to the job queue to be deleted"
2268 }
2269 ]
2270 },
2271 %{
2272 group: :pleroma,
2273 type: :group,
2274 description: "Authenticator",
2275 children: [
2276 %{
2277 key: Pleroma.Web.Auth.Authenticator,
2278 type: :module,
2279 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2280 }
2281 ]
2282 },
2283 %{
2284 group: :pleroma,
2285 key: :ldap,
2286 type: :group,
2287 description:
2288 "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2289 " will be verified by trying to authenticate (bind) to a LDAP server." <>
2290 " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2291 " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2292 children: [
2293 %{
2294 key: :enabled,
2295 type: :boolean,
2296 description: "Enables LDAP authentication"
2297 },
2298 %{
2299 key: :host,
2300 type: :string,
2301 description: "LDAP server hostname",
2302 suggestions: ["localhosts"]
2303 },
2304 %{
2305 key: :port,
2306 type: :integer,
2307 description: "LDAP port, e.g. 389 or 636",
2308 suggestions: [389, 636]
2309 },
2310 %{
2311 key: :ssl,
2312 label: "SSL",
2313 type: :boolean,
2314 description: "Enable to use SSL, usually implies the port 636"
2315 },
2316 %{
2317 key: :sslopts,
2318 label: "SSL options",
2319 type: :keyword,
2320 description: "Additional SSL options",
2321 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2322 children: [
2323 %{
2324 key: :cacertfile,
2325 type: :string,
2326 description: "Path to file with PEM encoded cacerts",
2327 suggestions: ["path/to/file/with/PEM/cacerts"]
2328 },
2329 %{
2330 key: :verify,
2331 type: :atom,
2332 description: "Type of cert verification",
2333 suggestions: [:verify_peer]
2334 }
2335 ]
2336 },
2337 %{
2338 key: :tls,
2339 label: "TLS",
2340 type: :boolean,
2341 description: "Enable to use STARTTLS, usually implies the port 389"
2342 },
2343 %{
2344 key: :tlsopts,
2345 label: "TLS options",
2346 type: :keyword,
2347 description: "Additional TLS options",
2348 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2349 children: [
2350 %{
2351 key: :cacertfile,
2352 type: :string,
2353 description: "Path to file with PEM encoded cacerts",
2354 suggestions: ["path/to/file/with/PEM/cacerts"]
2355 },
2356 %{
2357 key: :verify,
2358 type: :atom,
2359 description: "Type of cert verification",
2360 suggestions: [:verify_peer]
2361 }
2362 ]
2363 },
2364 %{
2365 key: :base,
2366 type: :string,
2367 description: "LDAP base, e.g. \"dc=example,dc=com\"",
2368 suggestions: ["dc=example,dc=com"]
2369 },
2370 %{
2371 key: :uid,
2372 type: :string,
2373 description:
2374 "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2375 suggestions: ["cn"]
2376 }
2377 ]
2378 },
2379 %{
2380 group: :pleroma,
2381 key: :auth,
2382 type: :group,
2383 description: "Authentication / authorization settings",
2384 children: [
2385 %{
2386 key: :enforce_oauth_admin_scope_usage,
2387 type: :boolean,
2388 description:
2389 "OAuth admin scope requirement toggle. " <>
2390 "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2391 "(client app must support admin scopes). If disabled and token doesn't have admin scope(s)," <>
2392 "`is_admin` user flag grants access to admin-specific actions."
2393 },
2394 %{
2395 key: :auth_template,
2396 type: :string,
2397 description:
2398 "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2399 suggestions: ["show.html"]
2400 },
2401 %{
2402 key: :oauth_consumer_template,
2403 type: :string,
2404 description:
2405 "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2406 " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2407 suggestions: ["consumer.html"]
2408 },
2409 %{
2410 key: :oauth_consumer_strategies,
2411 type: {:list, :string},
2412 description:
2413 "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2414 " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2415 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2416 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2417 }
2418 ]
2419 },
2420 %{
2421 group: :pleroma,
2422 key: :email_notifications,
2423 type: :group,
2424 description: "Email notifications settings",
2425 children: [
2426 %{
2427 key: :digest,
2428 type: :map,
2429 description:
2430 "emails of \"what you've missed\" for users who have been inactive for a while",
2431 suggestions: [
2432 %{
2433 active: false,
2434 schedule: "0 0 * * 0",
2435 interval: 7,
2436 inactivity_threshold: 7
2437 }
2438 ],
2439 children: [
2440 %{
2441 key: :active,
2442 label: "Enabled",
2443 type: :boolean,
2444 description: "Globally enable or disable digest emails"
2445 },
2446 %{
2447 key: :schedule,
2448 type: :string,
2449 description:
2450 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2451 suggestions: ["0 0 * * 0"]
2452 },
2453 %{
2454 key: :interval,
2455 type: :integer,
2456 description: "Minimum interval between digest emails to one user",
2457 suggestions: [7]
2458 },
2459 %{
2460 key: :inactivity_threshold,
2461 type: :integer,
2462 description: "Minimum user inactivity threshold",
2463 suggestions: [7]
2464 }
2465 ]
2466 }
2467 ]
2468 },
2469 %{
2470 group: :pleroma,
2471 key: Pleroma.Emails.UserEmail,
2472 type: :group,
2473 description: "Email template settings",
2474 children: [
2475 %{
2476 key: :logo,
2477 type: :string,
2478 description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2479 suggestions: ["some/path/logo.png"]
2480 },
2481 %{
2482 key: :styling,
2483 type: :map,
2484 description: "a map with color settings for email templates.",
2485 suggestions: [
2486 %{
2487 link_color: "#d8a070",
2488 background_color: "#2C3645",
2489 content_background_color: "#1B2635",
2490 header_color: "#d8a070",
2491 text_color: "#b9b9ba",
2492 text_muted_color: "#b9b9ba"
2493 }
2494 ],
2495 children: [
2496 %{
2497 key: :link_color,
2498 type: :string,
2499 suggestions: ["#d8a070"]
2500 },
2501 %{
2502 key: :background_color,
2503 type: :string,
2504 suggestions: ["#2C3645"]
2505 },
2506 %{
2507 key: :content_background_color,
2508 type: :string,
2509 suggestions: ["#1B2635"]
2510 },
2511 %{
2512 key: :header_color,
2513 type: :string,
2514 suggestions: ["#d8a070"]
2515 },
2516 %{
2517 key: :text_color,
2518 type: :string,
2519 suggestions: ["#b9b9ba"]
2520 },
2521 %{
2522 key: :text_muted_color,
2523 type: :string,
2524 suggestions: ["#b9b9ba"]
2525 }
2526 ]
2527 }
2528 ]
2529 },
2530 %{
2531 group: :pleroma,
2532 key: Pleroma.Emails.NewUsersDigestEmail,
2533 type: :group,
2534 description: "New users admin email digest",
2535 children: [
2536 %{
2537 key: :enabled,
2538 type: :boolean,
2539 description: "enables new users admin digest email when `true`",
2540 suggestions: [false]
2541 }
2542 ]
2543 },
2544 %{
2545 group: :pleroma,
2546 key: :oauth2,
2547 type: :group,
2548 description: "Configure OAuth 2 provider capabilities",
2549 children: [
2550 %{
2551 key: :token_expires_in,
2552 type: :integer,
2553 description: "The lifetime in seconds of the access token",
2554 suggestions: [600]
2555 },
2556 %{
2557 key: :issue_new_refresh_token,
2558 type: :boolean,
2559 description:
2560 "Keeps old refresh token or generate new refresh token when to obtain an access token"
2561 },
2562 %{
2563 key: :clean_expired_tokens,
2564 type: :boolean,
2565 description: "Enable a background job to clean expired oauth tokens. Default: disabled."
2566 }
2567 ]
2568 },
2569 %{
2570 group: :pleroma,
2571 key: :emoji,
2572 type: :group,
2573 children: [
2574 %{
2575 key: :shortcode_globs,
2576 type: {:list, :string},
2577 description: "Location of custom emoji files. * can be used as a wildcard.",
2578 suggestions: ["/emoji/custom/**/*.png"]
2579 },
2580 %{
2581 key: :pack_extensions,
2582 type: {:list, :string},
2583 description:
2584 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2585 suggestions: [".png", ".gif"]
2586 },
2587 %{
2588 key: :groups,
2589 type: {:keyword, :string, {:list, :string}},
2590 description:
2591 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2592 " and the value is the location or array of locations. * can be used as a wildcard.",
2593 suggestions: [
2594 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2595 ]
2596 },
2597 %{
2598 key: :default_manifest,
2599 type: :string,
2600 description:
2601 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2602 " Currently only one manifest can be added (no arrays).",
2603 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2604 },
2605 %{
2606 key: :shared_pack_cache_seconds_per_file,
2607 label: "Shared pack cache s/file",
2608 type: :integer,
2609 descpiption:
2610 "When an emoji pack is shared, the archive is created and cached in memory" <>
2611 " for this amount of seconds multiplied by the number of files.",
2612 suggestions: [60]
2613 }
2614 ]
2615 },
2616 %{
2617 group: :pleroma,
2618 key: :rate_limit,
2619 type: :group,
2620 description:
2621 "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2622 children: [
2623 %{
2624 key: :search,
2625 type: [:tuple, {:list, :tuple}],
2626 description: "For the search requests (account & status search etc.)",
2627 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2628 },
2629 %{
2630 key: :timeline,
2631 type: [:tuple, {:list, :tuple}],
2632 description: "For requests to timelines (each timeline has it's own limiter)",
2633 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2634 },
2635 %{
2636 key: :app_account_creation,
2637 type: [:tuple, {:list, :tuple}],
2638 description: "For registering user accounts from the same IP address",
2639 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2640 },
2641 %{
2642 key: :relations_actions,
2643 type: [:tuple, {:list, :tuple}],
2644 description: "For actions on relationships with all users (follow, unfollow)",
2645 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2646 },
2647 %{
2648 key: :relation_id_action,
2649 type: [:tuple, {:list, :tuple}],
2650 description: "For actions on relation with a specific user (follow, unfollow)",
2651 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2652 },
2653 %{
2654 key: :statuses_actions,
2655 type: [:tuple, {:list, :tuple}],
2656 description:
2657 "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2658 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2659 },
2660 %{
2661 key: :status_id_action,
2662 type: [:tuple, {:list, :tuple}],
2663 description:
2664 "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2665 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2666 },
2667 %{
2668 key: :authentication,
2669 type: [:tuple, {:list, :tuple}],
2670 description: "For authentication create / password check / user existence check requests",
2671 suggestions: [{60_000, 15}]
2672 }
2673 ]
2674 },
2675 %{
2676 group: :esshd,
2677 type: :group,
2678 description:
2679 "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
2680 "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
2681 children: [
2682 %{
2683 key: :enabled,
2684 type: :boolean,
2685 description: "Enables SSH"
2686 },
2687 %{
2688 key: :priv_dir,
2689 type: :string,
2690 description: "Dir with SSH keys",
2691 suggestions: ["/some/path/ssh_keys"]
2692 },
2693 %{
2694 key: :handler,
2695 type: :string,
2696 description: "Handler module",
2697 suggestions: ["Pleroma.BBS.Handler"]
2698 },
2699 %{
2700 key: :port,
2701 type: :integer,
2702 description: "Port to connect",
2703 suggestions: [10_022]
2704 },
2705 %{
2706 key: :password_authenticator,
2707 type: :string,
2708 description: "Authenticator module",
2709 suggestions: ["Pleroma.BBS.Authenticator"]
2710 }
2711 ]
2712 },
2713 %{
2714 group: :mime,
2715 type: :group,
2716 description: "Mime types",
2717 children: [
2718 %{
2719 key: :types,
2720 type: :map,
2721 suggestions: [
2722 %{
2723 "application/xml" => ["xml"],
2724 "application/xrd+xml" => ["xrd+xml"],
2725 "application/jrd+json" => ["jrd+json"],
2726 "application/activity+json" => ["activity+json"],
2727 "application/ld+json" => ["activity+json"]
2728 }
2729 ],
2730 children: [
2731 %{
2732 key: "application/xml",
2733 type: {:list, :string},
2734 suggestions: ["xml"]
2735 },
2736 %{
2737 key: "application/xrd+xml",
2738 type: {:list, :string},
2739 suggestions: ["xrd+xml"]
2740 },
2741 %{
2742 key: "application/jrd+json",
2743 type: {:list, :string},
2744 suggestions: ["jrd+json"]
2745 },
2746 %{
2747 key: "application/activity+json",
2748 type: {:list, :string},
2749 suggestions: ["activity+json"]
2750 },
2751 %{
2752 key: "application/ld+json",
2753 type: {:list, :string},
2754 suggestions: ["activity+json"]
2755 }
2756 ]
2757 }
2758 ]
2759 },
2760 %{
2761 group: :pleroma,
2762 key: :chat,
2763 type: :group,
2764 description: "Pleroma chat settings",
2765 children: [
2766 %{
2767 key: :enabled,
2768 type: :boolean
2769 }
2770 ]
2771 },
2772 %{
2773 group: :pleroma,
2774 key: :http,
2775 type: :group,
2776 description: "HTTP settings",
2777 children: [
2778 %{
2779 key: :proxy_url,
2780 label: "Proxy URL",
2781 type: [:string, :tuple],
2782 description: "Proxy URL",
2783 suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
2784 },
2785 %{
2786 key: :send_user_agent,
2787 type: :boolean
2788 },
2789 %{
2790 key: :user_agent,
2791 type: [:string, :atom],
2792 description:
2793 "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
2794 suggestions: ["Pleroma", :default]
2795 },
2796 %{
2797 key: :adapter,
2798 type: :keyword,
2799 description: "Adapter specific options",
2800 suggestions: [],
2801 children: [
2802 %{
2803 key: :ssl_options,
2804 type: :keyword,
2805 label: "SSL Options",
2806 description: "SSL options for HTTP adapter",
2807 children: [
2808 %{
2809 key: :versions,
2810 type: {:list, :atom},
2811 description: "List of TLS version to use",
2812 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
2813 }
2814 ]
2815 }
2816 ]
2817 }
2818 ]
2819 },
2820 %{
2821 group: :pleroma,
2822 key: :markup,
2823 type: :group,
2824 children: [
2825 %{
2826 key: :allow_inline_images,
2827 type: :boolean
2828 },
2829 %{
2830 key: :allow_headings,
2831 type: :boolean
2832 },
2833 %{
2834 key: :allow_tables,
2835 type: :boolean
2836 },
2837 %{
2838 key: :allow_fonts,
2839 type: :boolean
2840 },
2841 %{
2842 key: :scrub_policy,
2843 type: {:list, :module},
2844 description:
2845 "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
2846 suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
2847 }
2848 ]
2849 },
2850 %{
2851 group: :pleroma,
2852 key: :user,
2853 type: :group,
2854 children: [
2855 %{
2856 key: :deny_follow_blocked,
2857 type: :boolean
2858 }
2859 ]
2860 },
2861 %{
2862 group: :pleroma,
2863 key: :mrf_normalize_markup,
2864 label: "MRF normalize markup",
2865 description: "MRF NormalizeMarkup settings. Scrub configured hypertext markup.",
2866 type: :group,
2867 children: [
2868 %{
2869 key: :scrub_policy,
2870 type: :module,
2871 suggestions: [Pleroma.HTML.Scrubber.Default]
2872 }
2873 ]
2874 },
2875 %{
2876 group: :pleroma,
2877 key: Pleroma.User,
2878 type: :group,
2879 children: [
2880 %{
2881 key: :restricted_nicknames,
2882 type: {:list, :string},
2883 suggestions: [
2884 ".well-known",
2885 "~",
2886 "about",
2887 "activities",
2888 "api",
2889 "auth",
2890 "check_password",
2891 "dev",
2892 "friend-requests",
2893 "inbox",
2894 "internal",
2895 "main",
2896 "media",
2897 "nodeinfo",
2898 "notice",
2899 "oauth",
2900 "objects",
2901 "ostatus_subscribe",
2902 "pleroma",
2903 "proxy",
2904 "push",
2905 "registration",
2906 "relay",
2907 "settings",
2908 "status",
2909 "tag",
2910 "user-search",
2911 "user_exists",
2912 "users",
2913 "web"
2914 ]
2915 }
2916 ]
2917 },
2918 %{
2919 group: :cors_plug,
2920 type: :group,
2921 children: [
2922 %{
2923 key: :max_age,
2924 type: :integer,
2925 suggestions: [86_400]
2926 },
2927 %{
2928 key: :methods,
2929 type: {:list, :string},
2930 suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
2931 },
2932 %{
2933 key: :expose,
2934 type: {:list, :string},
2935 suggestions: [
2936 "Link",
2937 "X-RateLimit-Reset",
2938 "X-RateLimit-Limit",
2939 "X-RateLimit-Remaining",
2940 "X-Request-Id",
2941 "Idempotency-Key"
2942 ]
2943 },
2944 %{
2945 key: :credentials,
2946 type: :boolean
2947 },
2948 %{
2949 key: :headers,
2950 type: {:list, :string},
2951 suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
2952 }
2953 ]
2954 },
2955 %{
2956 group: :pleroma,
2957 key: Pleroma.Plugs.RemoteIp,
2958 type: :group,
2959 description: """
2960 `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
2961 **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
2962 """,
2963 children: [
2964 %{
2965 key: :enabled,
2966 type: :boolean,
2967 description: "Enable/disable the plug. Default: disabled."
2968 },
2969 %{
2970 key: :headers,
2971 type: {:list, :string},
2972 description:
2973 "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Default: `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`."
2974 },
2975 %{
2976 key: :proxies,
2977 type: {:list, :string},
2978 description:
2979 "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Default: `[]`."
2980 },
2981 %{
2982 key: :reserved,
2983 type: {:list, :string},
2984 description:
2985 "Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network)."
2986 }
2987 ]
2988 },
2989 %{
2990 group: :pleroma,
2991 key: :web_cache_ttl,
2992 type: :group,
2993 description:
2994 "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
2995 children: [
2996 %{
2997 key: :activity_pub,
2998 type: :integer,
2999 description:
3000 "Activity pub routes (except question activities). Default: `nil` (no expiration).",
3001 suggestions: [30_000, nil]
3002 },
3003 %{
3004 key: :activity_pub_question,
3005 type: :integer,
3006 description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
3007 suggestions: [30_000]
3008 }
3009 ]
3010 },
3011 %{
3012 group: :pleroma,
3013 key: :static_fe,
3014 type: :group,
3015 description:
3016 "Render profiles and posts using server-generated HTML that is viewable without using JavaScript.",
3017 children: [
3018 %{
3019 key: :enabled,
3020 type: :boolean,
3021 description: "Enables the rendering of static HTML. Default: disabled."
3022 }
3023 ]
3024 },
3025 %{
3026 group: :pleroma,
3027 key: :feed,
3028 type: :group,
3029 description: "Configure feed rendering",
3030 children: [
3031 %{
3032 key: :post_title,
3033 type: :map,
3034 description: "Configure title rendering.",
3035 children: [
3036 %{
3037 key: :max_length,
3038 type: :integer,
3039 description: "Maximum number of characters before truncating title.",
3040 suggestions: [100]
3041 },
3042 %{
3043 key: :omission,
3044 type: :string,
3045 description: "Replacement which will be used after truncating string.",
3046 suggestions: ["..."]
3047 }
3048 ]
3049 }
3050 ]
3051 },
3052 %{
3053 group: :pleroma,
3054 key: :mrf_object_age,
3055 type: :group,
3056 description: "Rejects or delists posts based on their age when received.",
3057 children: [
3058 %{
3059 key: :threshold,
3060 type: :integer,
3061 description: "Required age (in seconds) of a post before actions are taken.",
3062 suggestions: [172_800]
3063 },
3064 %{
3065 key: :actions,
3066 type: {:list, :atom},
3067 description:
3068 "A list of actions to apply to the post. `:delist` removes the post from public timelines; " <>
3069 "`:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines; " <>
3070 "`:reject` rejects the message entirely",
3071 suggestions: [:delist, :strip_followers, :reject]
3072 }
3073 ]
3074 },
3075 %{
3076 group: :pleroma,
3077 key: :modules,
3078 type: :group,
3079 description: "Custom Runtime Modules",
3080 children: [
3081 %{
3082 key: :runtime_dir,
3083 type: :string,
3084 description: "A path to custom Elixir modules (such as MRF policies)."
3085 }
3086 ]
3087 },
3088 %{
3089 group: :pleroma,
3090 key: :streamer,
3091 type: :group,
3092 description: "Settings for notifications streamer",
3093 children: [
3094 %{
3095 key: :workers,
3096 type: :integer,
3097 description: "Number of workers to send notifications.",
3098 suggestions: [3]
3099 },
3100 %{
3101 key: :overflow_workers,
3102 type: :integer,
3103 description: "Maximum number of workers created if pool is empty.",
3104 suggestions: [2]
3105 }
3106 ]
3107 },
3108 %{
3109 group: :pleroma,
3110 key: :connections_pool,
3111 type: :group,
3112 description: "Advanced settings for `gun` connections pool",
3113 children: [
3114 %{
3115 key: :checkin_timeout,
3116 type: :integer,
3117 description: "Timeout to checkin connection from pool. Default: 250ms.",
3118 suggestions: [250]
3119 },
3120 %{
3121 key: :max_connections,
3122 type: :integer,
3123 description: "Maximum number of connections in the pool. Default: 250 connections.",
3124 suggestions: [250]
3125 },
3126 %{
3127 key: :retry,
3128 type: :integer,
3129 description:
3130 "Number of retries, while `gun` will try to reconnect if connection goes down. Default: 1.",
3131 suggestions: [1]
3132 },
3133 %{
3134 key: :retry_timeout,
3135 type: :integer,
3136 description:
3137 "Time between retries when `gun` will try to reconnect in milliseconds. Default: 1000ms.",
3138 suggestions: [1000]
3139 },
3140 %{
3141 key: :await_up_timeout,
3142 type: :integer,
3143 description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
3144 suggestions: [5000]
3145 }
3146 ]
3147 },
3148 %{
3149 group: :pleroma,
3150 key: :pools,
3151 type: :group,
3152 description: "Advanced settings for `gun` workers pools",
3153 children: [
3154 %{
3155 key: :federation,
3156 type: :keyword,
3157 description: "Settings for federation pool.",
3158 children: [
3159 %{
3160 key: :size,
3161 type: :integer,
3162 description: "Number workers in the pool.",
3163 suggestions: [50]
3164 },
3165 %{
3166 key: :max_overflow,
3167 type: :integer,
3168 description: "Number of additional workers if pool is under load.",
3169 suggestions: [10]
3170 },
3171 %{
3172 key: :timeout,
3173 type: :integer,
3174 description: "Timeout while `gun` will wait for response.",
3175 suggestions: [150_000]
3176 }
3177 ]
3178 },
3179 %{
3180 key: :media,
3181 type: :keyword,
3182 description: "Settings for media pool.",
3183 children: [
3184 %{
3185 key: :size,
3186 type: :integer,
3187 description: "Number workers in the pool.",
3188 suggestions: [50]
3189 },
3190 %{
3191 key: :max_overflow,
3192 type: :integer,
3193 description: "Number of additional workers if pool is under load.",
3194 suggestions: [10]
3195 },
3196 %{
3197 key: :timeout,
3198 type: :integer,
3199 description: "Timeout while `gun` will wait for response.",
3200 suggestions: [150_000]
3201 }
3202 ]
3203 },
3204 %{
3205 key: :upload,
3206 type: :keyword,
3207 description: "Settings for upload pool.",
3208 children: [
3209 %{
3210 key: :size,
3211 type: :integer,
3212 description: "Number workers in the pool.",
3213 suggestions: [25]
3214 },
3215 %{
3216 key: :max_overflow,
3217 type: :integer,
3218 description: "Number of additional workers if pool is under load.",
3219 suggestions: [5]
3220 },
3221 %{
3222 key: :timeout,
3223 type: :integer,
3224 description: "Timeout while `gun` will wait for response.",
3225 suggestions: [300_000]
3226 }
3227 ]
3228 },
3229 %{
3230 key: :default,
3231 type: :keyword,
3232 description: "Settings for default pool.",
3233 children: [
3234 %{
3235 key: :size,
3236 type: :integer,
3237 description: "Number workers in the pool.",
3238 suggestions: [10]
3239 },
3240 %{
3241 key: :max_overflow,
3242 type: :integer,
3243 description: "Number of additional workers if pool is under load.",
3244 suggestions: [2]
3245 },
3246 %{
3247 key: :timeout,
3248 type: :integer,
3249 description: "Timeout while `gun` will wait for response.",
3250 suggestions: [10_000]
3251 }
3252 ]
3253 }
3254 ]
3255 },
3256 %{
3257 group: :pleroma,
3258 key: :hackney_pools,
3259 type: :group,
3260 description: "Advanced settings for `hackney` connections pools",
3261 children: [
3262 %{
3263 key: :federation,
3264 type: :keyword,
3265 description: "Settings for federation pool.",
3266 children: [
3267 %{
3268 key: :max_connections,
3269 type: :integer,
3270 description: "Number workers in the pool.",
3271 suggestions: [50]
3272 },
3273 %{
3274 key: :timeout,
3275 type: :integer,
3276 description: "Timeout while `hackney` will wait for response.",
3277 suggestions: [150_000]
3278 }
3279 ]
3280 },
3281 %{
3282 key: :media,
3283 type: :keyword,
3284 description: "Settings for media pool.",
3285 children: [
3286 %{
3287 key: :max_connections,
3288 type: :integer,
3289 description: "Number workers in the pool.",
3290 suggestions: [50]
3291 },
3292 %{
3293 key: :timeout,
3294 type: :integer,
3295 description: "Timeout while `hackney` will wait for response.",
3296 suggestions: [150_000]
3297 }
3298 ]
3299 },
3300 %{
3301 key: :upload,
3302 type: :keyword,
3303 description: "Settings for upload pool.",
3304 children: [
3305 %{
3306 key: :max_connections,
3307 type: :integer,
3308 description: "Number workers in the pool.",
3309 suggestions: [25]
3310 },
3311 %{
3312 key: :timeout,
3313 type: :integer,
3314 description: "Timeout while `hackney` will wait for response.",
3315 suggestions: [300_000]
3316 }
3317 ]
3318 }
3319 ]
3320 },
3321 %{
3322 group: :pleroma,
3323 key: :restrict_unauthenticated,
3324 type: :group,
3325 description:
3326 "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
3327 children: [
3328 %{
3329 key: :timelines,
3330 type: :map,
3331 description: "Settings for public and federated timelines.",
3332 children: [
3333 %{
3334 key: :local,
3335 type: :boolean,
3336 description: "Disallow view public timeline."
3337 },
3338 %{
3339 key: :federated,
3340 type: :boolean,
3341 description: "Disallow view federated timeline."
3342 }
3343 ]
3344 },
3345 %{
3346 key: :profiles,
3347 type: :map,
3348 description: "Settings for user profiles.",
3349 children: [
3350 %{
3351 key: :local,
3352 type: :boolean,
3353 description: "Disallow view local user profiles."
3354 },
3355 %{
3356 key: :remote,
3357 type: :boolean,
3358 description: "Disallow view remote user profiles."
3359 }
3360 ]
3361 },
3362 %{
3363 key: :activities,
3364 type: :map,
3365 description: "Settings for statuses.",
3366 children: [
3367 %{
3368 key: :local,
3369 type: :boolean,
3370 description: "Disallow view local statuses."
3371 },
3372 %{
3373 key: :remote,
3374 type: :boolean,
3375 description: "Disallow view remote statuses."
3376 }
3377 ]
3378 }
3379 ]
3380 },
3381 %{
3382 group: :pleroma,
3383 key: Pleroma.Web.ApiSpec.CastAndValidate,
3384 type: :group,
3385 children: [
3386 %{
3387 key: :strict,
3388 type: :boolean,
3389 description:
3390 "Enables strict input validation (useful in development, not recommended in production)",
3391 suggestions: [false]
3392 }
3393 ]
3394 }
3395 ]