formatting
[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: [
27 Generator.uploaders_list()
28 ]
29 },
30 %{
31 key: :filters,
32 type: {:list, :module},
33 description: "List of filter modules for uploads",
34 suggestions: [
35 Generator.filters_list()
36 ]
37 },
38 %{
39 key: :link_name,
40 type: :boolean,
41 description:
42 "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`",
43 suggestions: [
44 true,
45 false
46 ]
47 },
48 %{
49 key: :base_url,
50 type: :string,
51 description: "Base url for the uploads, needed if you use CDN",
52 suggestions: [
53 "https://cdn-host.com"
54 ]
55 },
56 %{
57 key: :proxy_remote,
58 type: :boolean,
59 description:
60 "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected.",
61 suggestions: [
62 true,
63 false
64 ]
65 },
66 %{
67 key: :proxy_opts,
68 type: :keyword,
69 description: "Proxy options, see `Pleroma.ReverseProxy` documentation"
70 }
71 ]
72 },
73 %{
74 group: :pleroma,
75 key: Pleroma.Uploaders.Local,
76 type: :group,
77 description: "Local uploader-related settings",
78 children: [
79 %{
80 key: :uploads,
81 type: :string,
82 description: "Path where user uploads will be saved",
83 suggestions: [
84 "uploads"
85 ]
86 }
87 ]
88 },
89 %{
90 group: :pleroma,
91 key: Pleroma.Uploaders.S3,
92 type: :group,
93 description: "S3 uploader-related settings",
94 children: [
95 %{
96 key: :bucket,
97 type: :string,
98 description: "S3 bucket",
99 suggestions: [
100 "bucket"
101 ]
102 },
103 %{
104 key: :bucket_namespace,
105 type: :string,
106 description: "S3 bucket namespace",
107 suggestions: ["pleroma"]
108 },
109 %{
110 key: :public_endpoint,
111 type: :string,
112 description: "S3 endpoint",
113 suggestions: ["https://s3.amazonaws.com"]
114 },
115 %{
116 key: :truncated_namespace,
117 type: :string,
118 description:
119 "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
120 " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint.",
121 suggestions: [""]
122 }
123 ]
124 },
125 %{
126 group: :pleroma,
127 key: Pleroma.Upload.Filter.Mogrify,
128 type: :group,
129 description: "Uploads mogrify filter settings",
130 children: [
131 %{
132 key: :args,
133 type: [:string, {:list, :string}, {:list, :tuple}],
134 description: "List of actions for the mogrify command",
135 suggestions: [
136 "strip",
137 ["strip", "auto-orient"],
138 [{"implode", "1"}],
139 ["strip", "auto-orient", {"implode", "1"}]
140 ]
141 }
142 ]
143 },
144 %{
145 group: :pleroma,
146 key: Pleroma.Upload.Filter.AnonymizeFilename,
147 type: :group,
148 description: "Filter replaces the filename of the upload",
149 children: [
150 %{
151 key: :text,
152 type: :string,
153 description:
154 "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
155 " filename extension by using {extension}, for example custom-file-name.{extension}",
156 suggestions: [
157 "custom-file-name.{extension}",
158 nil
159 ]
160 }
161 ]
162 },
163 %{
164 group: :pleroma,
165 key: Pleroma.Emails.Mailer,
166 type: :group,
167 description: "Mailer-related settings",
168 children: [
169 %{
170 key: :adapter,
171 type: :module,
172 description:
173 "One of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters)," <>
174 " or Swoosh.Adapters.Local for in-memory mailbox",
175 suggestions: [
176 Swoosh.Adapters.SMTP,
177 Swoosh.Adapters.Sendgrid,
178 Swoosh.Adapters.Sendmail,
179 Swoosh.Adapters.Mandrill,
180 Swoosh.Adapters.Mailgun,
181 Swoosh.Adapters.Mailjet,
182 Swoosh.Adapters.Postmark,
183 Swoosh.Adapters.SparkPost,
184 Swoosh.Adapters.AmazonSES,
185 Swoosh.Adapters.Dyn,
186 Swoosh.Adapters.SocketLabs,
187 Swoosh.Adapters.Gmail
188 ]
189 },
190 %{
191 key: :enabled,
192 type: :boolean,
193 description: "Allow/disallow send emails",
194 suggestions: [
195 true,
196 false
197 ]
198 },
199 %{
200 group: {:subgroup, Swoosh.Adapters.SMTP},
201 key: :relay,
202 type: :string,
203 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
204 suggestions: ["smtp.gmail.com"]
205 },
206 %{
207 group: {:subgroup, Swoosh.Adapters.SMTP},
208 key: :username,
209 type: :string,
210 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
211 suggestions: ["pleroma"]
212 },
213 %{
214 group: {:subgroup, Swoosh.Adapters.SMTP},
215 key: :password,
216 type: :string,
217 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
218 suggestions: ["password"]
219 },
220 %{
221 group: {:subgroup, Swoosh.Adapters.SMTP},
222 key: :ssl,
223 type: :boolean,
224 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
225 suggestions: [true, false]
226 },
227 %{
228 group: {:subgroup, Swoosh.Adapters.SMTP},
229 key: :tls,
230 type: :atom,
231 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
232 suggestions: [:always, :never, :if_available]
233 },
234 %{
235 group: {:subgroup, Swoosh.Adapters.SMTP},
236 key: :auth,
237 type: :atom,
238 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
239 suggestions: [:always, :never, :if_available]
240 },
241 %{
242 group: {:subgroup, Swoosh.Adapters.SMTP},
243 key: :port,
244 type: :integer,
245 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
246 suggestions: [1025]
247 },
248 %{
249 group: {:subgroup, Swoosh.Adapters.SMTP},
250 key: :retries,
251 type: :integer,
252 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
253 suggestions: [5]
254 },
255 %{
256 group: {:subgroup, Swoosh.Adapters.SMTP},
257 key: :no_mx_lookups,
258 type: :boolean,
259 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
260 suggestions: [true, false]
261 },
262 %{
263 group: {:subgroup, Swoosh.Adapters.Sendgrid},
264 key: :api_key,
265 type: :string,
266 description: "`Swoosh.Adapters.Sendgrid` adapter specific setting",
267 suggestions: ["my-api-key"]
268 },
269 %{
270 group: {:subgroup, Swoosh.Adapters.Sendmail},
271 key: :cmd_path,
272 type: :string,
273 description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
274 suggestions: ["/usr/bin/sendmail"]
275 },
276 %{
277 group: {:subgroup, Swoosh.Adapters.Sendmail},
278 key: :cmd_args,
279 type: :string,
280 description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
281 suggestions: ["-N delay,failure,success"]
282 },
283 %{
284 group: {:subgroup, Swoosh.Adapters.Sendmail},
285 key: :qmail,
286 type: :boolean,
287 description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
288 suggestions: [true, false]
289 },
290 %{
291 group: {:subgroup, Swoosh.Adapters.Mandrill},
292 key: :api_key,
293 type: :string,
294 description: "`Swoosh.Adapters.Mandrill` adapter specific setting",
295 suggestions: ["my-api-key"]
296 },
297 %{
298 group: {:subgroup, Swoosh.Adapters.Mailgun},
299 key: :api_key,
300 type: :string,
301 description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
302 suggestions: ["my-api-key"]
303 },
304 %{
305 group: {:subgroup, Swoosh.Adapters.Mailgun},
306 key: :domain,
307 type: :string,
308 description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
309 suggestions: ["pleroma.com"]
310 },
311 %{
312 group: {:subgroup, Swoosh.Adapters.Mailjet},
313 key: :api_key,
314 type: :string,
315 description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
316 suggestions: ["my-api-key"]
317 },
318 %{
319 group: {:subgroup, Swoosh.Adapters.Mailjet},
320 key: :secret,
321 type: :string,
322 description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
323 suggestions: ["my-secret-key"]
324 },
325 %{
326 group: {:subgroup, Swoosh.Adapters.Postmark},
327 key: :api_key,
328 type: :string,
329 description: "`Swoosh.Adapters.Postmark` adapter specific setting",
330 suggestions: ["my-api-key"]
331 },
332 %{
333 group: {:subgroup, Swoosh.Adapters.SparkPost},
334 key: :api_key,
335 type: :string,
336 description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
337 suggestions: ["my-api-key"]
338 },
339 %{
340 group: {:subgroup, Swoosh.Adapters.SparkPost},
341 key: :endpoint,
342 type: :string,
343 description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
344 suggestions: ["https://api.sparkpost.com/api/v1"]
345 },
346 %{
347 group: {:subgroup, Swoosh.Adapters.AmazonSES},
348 key: :region,
349 type: {:string},
350 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
351 suggestions: ["us-east-1", "us-east-2"]
352 },
353 %{
354 group: {:subgroup, Swoosh.Adapters.AmazonSES},
355 key: :access_key,
356 type: :string,
357 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
358 suggestions: ["aws-access-key"]
359 },
360 %{
361 group: {:subgroup, Swoosh.Adapters.AmazonSES},
362 key: :secret,
363 type: :string,
364 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
365 suggestions: ["aws-secret-key"]
366 },
367 %{
368 group: {:subgroup, Swoosh.Adapters.Dyn},
369 key: :api_key,
370 type: :string,
371 description: "`Swoosh.Adapters.Dyn` adapter specific setting",
372 suggestions: ["my-api-key"]
373 },
374 %{
375 group: {:subgroup, Swoosh.Adapters.SocketLabs},
376 key: :server_id,
377 type: :string,
378 description: "`Swoosh.Adapters.SocketLabs` adapter specific setting",
379 suggestions: [""]
380 },
381 %{
382 group: {:subgroup, Swoosh.Adapters.SocketLabs},
383 key: :api_key,
384 type: :string,
385 description: "`Swoosh.Adapters.SocketLabs` adapter specific setting",
386 suggestions: [""]
387 },
388 %{
389 group: {:subgroup, Swoosh.Adapters.Gmail},
390 key: :access_token,
391 type: :string,
392 description: "`Swoosh.Adapters.Gmail` adapter specific setting",
393 suggestions: [""]
394 }
395 ]
396 },
397 %{
398 group: :pleroma,
399 key: :uri_schemes,
400 type: :group,
401 description: "URI schemes related settings",
402 children: [
403 %{
404 key: :valid_schemes,
405 type: {:list, :string},
406 description: "List of the scheme part that is considered valid to be an URL",
407 suggestions: [
408 [
409 "https",
410 "http",
411 "dat",
412 "dweb",
413 "gopher",
414 "ipfs",
415 "ipns",
416 "irc",
417 "ircs",
418 "magnet",
419 "mailto",
420 "mumble",
421 "ssb",
422 "xmpp"
423 ]
424 ]
425 }
426 ]
427 },
428 %{
429 group: :pleroma,
430 key: :instance,
431 type: :group,
432 description: "Instance-related settings",
433 children: [
434 %{
435 key: :name,
436 type: :string,
437 description: "Name of the instance",
438 suggestions: [
439 "Pleroma"
440 ]
441 },
442 %{
443 key: :email,
444 type: :string,
445 description: "Email used to reach an Administrator/Moderator of the instance",
446 suggestions: [
447 "email@example.com"
448 ]
449 },
450 %{
451 key: :notify_email,
452 type: :string,
453 description: "Email used for notifications",
454 suggestions: [
455 "notify@example.com"
456 ]
457 },
458 %{
459 key: :description,
460 type: :string,
461 description: "The instance's description, can be seen in nodeinfo and /api/v1/instance",
462 suggestions: [
463 "Very cool instance"
464 ]
465 },
466 %{
467 key: :limit,
468 type: :integer,
469 description: "Posts character limit (CW/Subject included in the counter)",
470 suggestions: [
471 5_000
472 ]
473 },
474 %{
475 key: :remote_limit,
476 type: :integer,
477 description: "Hard character limit beyond which remote posts will be dropped",
478 suggestions: [
479 100_000
480 ]
481 },
482 %{
483 key: :upload_limit,
484 type: :integer,
485 description: "File size limit of uploads (except for avatar, background, banner)",
486 suggestions: [
487 16_000_000
488 ]
489 },
490 %{
491 key: :avatar_upload_limit,
492 type: :integer,
493 description: "File size limit of user's profile avatars",
494 suggestions: [
495 2_000_000
496 ]
497 },
498 %{
499 key: :background_upload_limit,
500 type: :integer,
501 description: "File size limit of user's profile backgrounds",
502 suggestions: [
503 4_000_000
504 ]
505 },
506 %{
507 key: :banner_upload_limit,
508 type: :integer,
509 description: "File size limit of user's profile banners",
510 suggestions: [
511 4_000_000
512 ]
513 },
514 %{
515 key: :poll_limits,
516 type: :map,
517 description: "A map with poll limits for local polls",
518 suggestions: [
519 %{
520 max_options: 20,
521 max_option_chars: 200,
522 min_expiration: 0,
523 max_expiration: 31_536_000
524 }
525 ],
526 children: [
527 %{
528 key: :max_options,
529 type: :integer,
530 description: "Maximum number of options",
531 suggestions: [20]
532 },
533 %{
534 key: :max_option_chars,
535 type: :integer,
536 description: "Maximum number of characters per option",
537 suggestions: [200]
538 },
539 %{
540 key: :min_expiration,
541 type: :integer,
542 description: "Minimum expiration time (in seconds)",
543 suggestions: [0]
544 },
545 %{
546 key: :max_expiration,
547 type: :integer,
548 description: "Maximum expiration time (in seconds)",
549 suggestions: [3600]
550 }
551 ]
552 },
553 %{
554 key: :registrations_open,
555 type: :boolean,
556 description: "Enable registrations for anyone, invitations can be enabled when false",
557 suggestions: [
558 true,
559 false
560 ]
561 },
562 %{
563 key: :invites_enabled,
564 type: :boolean,
565 description: "Enable user invitations for admins (depends on registrations_open: false)",
566 suggestions: [
567 true,
568 false
569 ]
570 },
571 %{
572 key: :account_activation_required,
573 type: :boolean,
574 description: "Require users to confirm their emails before signing in",
575 suggestions: [
576 true,
577 false
578 ]
579 },
580 %{
581 key: :federating,
582 type: :boolean,
583 description: "Enable federation with other instances",
584 suggestions: [
585 true,
586 false
587 ]
588 },
589 %{
590 key: :federation_incoming_replies_max_depth,
591 type: :integer,
592 description:
593 "Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while" <>
594 " 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",
595 suggestions: [
596 100
597 ]
598 },
599 %{
600 key: :federation_reachability_timeout_days,
601 type: :integer,
602 description:
603 "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
604 suggestions: [
605 7
606 ]
607 },
608 %{
609 key: :federation_publisher_modules,
610 type: [:list, :module],
611 description: "List of modules for federation publishing",
612 suggestions: [
613 Pleroma.Web.ActivityPub.Publisher,
614 Pleroma.Web.Websub,
615 Pleroma.Web.Salmo
616 ]
617 },
618 %{
619 key: :allow_relay,
620 type: :boolean,
621 description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance",
622 suggestions: [
623 true,
624 false
625 ]
626 },
627 %{
628 key: :rewrite_policy,
629 type: {:list, :module},
630 description: "A list of MRF policies enabled",
631 suggestions: [
632 Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
633 Generator.mrf_list()
634 ]
635 },
636 %{
637 key: :public,
638 type: :boolean,
639 description:
640 "Makes the client API in authentificated mode-only except for user-profiles." <>
641 " Useful for disabling the Local Timeline and The Whole Known Network",
642 suggestions: [
643 true,
644 false
645 ]
646 },
647 %{
648 key: :quarantined_instances,
649 type: {:list, :string},
650 description:
651 "List of ActivityPub instances where private(DMs, followers-only) activities will not be send",
652 suggestions: [
653 "quarantined.com",
654 "*.quarantined.com"
655 ]
656 },
657 %{
658 key: :managed_config,
659 type: :boolean,
660 description:
661 "Whenether the config for pleroma-fe is configured in this config or in static/config.json",
662 suggestions: [
663 true,
664 false
665 ]
666 },
667 %{
668 key: :static_dir,
669 type: :string,
670 description: "Instance static directory",
671 suggestions: [
672 "instance/static/"
673 ]
674 },
675 %{
676 key: :allowed_post_formats,
677 type: {:list, :string},
678 description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
679 suggestions: [
680 [
681 "text/plain",
682 "text/html",
683 "text/markdown",
684 "text/bbcode"
685 ]
686 ]
687 },
688 %{
689 key: :mrf_transparency,
690 type: :boolean,
691 description:
692 "Make the content of your Message Rewrite Facility settings public (via nodeinfo)",
693 suggestions: [
694 true,
695 false
696 ]
697 },
698 %{
699 key: :mrf_transparency_exclusions,
700 type: {:list, :string},
701 description:
702 "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value",
703 suggestions: [
704 ["exclusion.com"]
705 ]
706 },
707 %{
708 key: :extended_nickname_format,
709 type: :boolean,
710 description:
711 "Set to true to use extended local nicknames format (allows underscores/dashes)." <>
712 " This will break federation with older software for theses nicknames",
713 suggestions: [
714 true,
715 false
716 ]
717 },
718 %{
719 key: :max_pinned_statuses,
720 type: :integer,
721 description: "The maximum number of pinned statuses. 0 will disable the feature",
722 suggestions: [
723 0,
724 1,
725 3
726 ]
727 },
728 %{
729 key: :autofollowed_nicknames,
730 type: {:list, :string},
731 description:
732 "Set to nicknames of (local) users that every new user should automatically follow",
733 suggestions: [
734 "lain",
735 "kaniini",
736 "lanodan",
737 "rinpatch"
738 ]
739 },
740 %{
741 key: :no_attachment_links,
742 type: :boolean,
743 description:
744 "Set to true to disable automatically adding attachment link text to statuses",
745 suggestions: [
746 true,
747 false
748 ]
749 },
750 %{
751 key: :welcome_message,
752 type: :string,
753 description:
754 "A message that will be send to a newly registered users as a direct message",
755 suggestions: [
756 "Hi, @username! Welcome to the board!",
757 nil
758 ]
759 },
760 %{
761 key: :welcome_user_nickname,
762 type: :string,
763 description: "The nickname of the local user that sends the welcome message",
764 suggestions: [
765 "lain",
766 nil
767 ]
768 },
769 %{
770 key: :max_report_comment_size,
771 type: :integer,
772 description: "The maximum size of the report comment (Default: 1000)",
773 suggestions: [
774 1_000
775 ]
776 },
777 %{
778 key: :safe_dm_mentions,
779 type: :boolean,
780 description:
781 "If set to true, only mentions at the beginning of a post will be used to address people in direct messages." <>
782 " This is to prevent accidental mentioning of people when talking about them (e.g. \"@friend hey i really don't like @enemy\")." <>
783 " Default: false",
784 suggestions: [
785 true,
786 false
787 ]
788 },
789 %{
790 key: :healthcheck,
791 type: :boolean,
792 description: "If set to true, system data will be shown on /api/pleroma/healthcheck",
793 suggestions: [
794 true,
795 false
796 ]
797 },
798 %{
799 key: :remote_post_retention_days,
800 type: :integer,
801 description:
802 "The default amount of days to retain remote posts when pruning the database",
803 suggestions: [
804 90
805 ]
806 },
807 %{
808 key: :user_bio_length,
809 type: :integer,
810 description: "A user bio maximum length (default: 5000)",
811 suggestions: [
812 5_000
813 ]
814 },
815 %{
816 key: :user_name_length,
817 type: :integer,
818 description: "A user name maximum length (default: 100)",
819 suggestions: [
820 100
821 ]
822 },
823 %{
824 key: :skip_thread_containment,
825 type: :boolean,
826 description: "Skip filter out broken threads. The default is true",
827 suggestions: [
828 true,
829 false
830 ]
831 },
832 %{
833 key: :limit_to_local_content,
834 type: [:atom, false],
835 description:
836 "Limit unauthenticated users to search for local statutes and users only. The default is :unauthenticated ",
837 suggestions: [
838 :unauthenticated,
839 :all,
840 false
841 ]
842 },
843 %{
844 key: :dynamic_configuration,
845 type: :boolean,
846 description:
847 "Allow transferring configuration to DB with the subsequent customization from Admin api. Defaults to `false`",
848 suggestions: [
849 true,
850 false
851 ]
852 },
853 %{
854 key: :max_account_fields,
855 type: :integer,
856 description: "The maximum number of custom fields in the user profile (default: 10)",
857 suggestions: [
858 10
859 ]
860 },
861 %{
862 key: :max_remote_account_fields,
863 type: :integer,
864 description:
865 "The maximum number of custom fields in the remote user profile (default: 20)",
866 suggestions: [
867 20
868 ]
869 },
870 %{
871 key: :account_field_name_length,
872 type: :integer,
873 description: "An account field name maximum length (default: 512)",
874 suggestions: [
875 512
876 ]
877 },
878 %{
879 key: :account_field_value_length,
880 type: :integer,
881 description: "An account field value maximum length (default: 512)",
882 suggestions: [
883 512
884 ]
885 },
886 %{
887 key: :external_user_synchronization,
888 type: :boolean,
889 description: "Enabling following/followers counters synchronization for external users",
890 suggestions: [
891 true,
892 false
893 ]
894 }
895 ]
896 },
897 %{
898 group: :logger,
899 type: :group,
900 description: "Logger-related settings",
901 children: [
902 %{
903 key: :backends,
904 type: [:atom, :tuple, :module],
905 description:
906 "Where logs will be send, :console - send logs to stdout, {ExSyslogger, :ex_syslogger} - to syslog, Quack.Logger - to Slack.",
907 suggestions: [[:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]]
908 }
909 ]
910 },
911 %{
912 group: :logger,
913 type: :group,
914 key: :ex_syslogger,
915 description: "ExSyslogger-related settings",
916 children: [
917 %{
918 key: :level,
919 type: :atom,
920 description: "Log level",
921 suggestions: [:debug, :info, :warn, :error]
922 },
923 %{
924 key: :ident,
925 type: :string,
926 description:
927 "A string that's prepended to every message, and is typically set to the app name",
928 suggestions: ["pleroma"]
929 },
930 %{
931 key: :format,
932 type: :string,
933 description: "It defaults to \"$date $time [$level] $levelpad$node $metadata $message\"",
934 suggestions: ["$metadata[$level] $message"]
935 },
936 %{
937 key: :metadata,
938 type: {:list, :atom},
939 description: "",
940 suggestions: [[:request_id]]
941 }
942 ]
943 },
944 %{
945 group: :logger,
946 type: :group,
947 key: :console,
948 description: "Console logger settings",
949 children: [
950 %{
951 key: :level,
952 type: :atom,
953 description: "Log level",
954 suggestions: [:debug, :info, :warn, :error]
955 },
956 %{
957 key: :format,
958 type: :string,
959 description: "It defaults to \"$date $time [$level] $levelpad$node $metadata $message\"",
960 suggestions: ["$metadata[$level] $message"]
961 },
962 %{
963 key: :metadata,
964 type: {:list, :atom},
965 description: "",
966 suggestions: [[:request_id]]
967 }
968 ]
969 },
970 %{
971 group: :quack,
972 type: :group,
973 description: "Quack-related settings",
974 children: [
975 %{
976 key: :level,
977 type: :atom,
978 description: "Log level",
979 suggestions: [:debug, :info, :warn, :error]
980 },
981 %{
982 key: :meta,
983 type: {:list, :atom},
984 description: "Configure which metadata you want to report on",
985 suggestions: [
986 :application,
987 :module,
988 :file,
989 :function,
990 :line,
991 :pid,
992 :crash_reason,
993 :initial_call,
994 :registered_name,
995 :all,
996 :none
997 ]
998 },
999 %{
1000 key: :webhook_url,
1001 type: :string,
1002 description: "Configure the Slack incoming webhook",
1003 suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
1004 }
1005 ]
1006 },
1007 %{
1008 group: :pleroma,
1009 key: :frontend_configurations,
1010 type: :group,
1011 description: "A keyword list that keeps the configuration data for any kind of frontend",
1012 children: [
1013 %{
1014 key: :pleroma_fe,
1015 type: :map,
1016 description: "Settings for Pleroma FE",
1017 suggestions: [
1018 %{
1019 theme: "pleroma-dark",
1020 logo: "/static/logo.png",
1021 background: "/images/city.jpg",
1022 redirectRootNoLogin: "/main/all",
1023 redirectRootLogin: "/main/friends",
1024 showInstanceSpecificPanel: true,
1025 scopeOptionsEnabled: false,
1026 formattingOptionsEnabled: false,
1027 collapseMessageWithSubject: false,
1028 hidePostStats: false,
1029 hideUserStats: false,
1030 scopeCopy: true,
1031 subjectLineBehavior: "email",
1032 alwaysShowSubjectInput: true
1033 }
1034 ],
1035 children: [
1036 %{
1037 key: :theme,
1038 type: :string,
1039 description: "Which theme to use, they are defined in styles.json",
1040 suggestions: ["pleroma-dark"]
1041 },
1042 %{
1043 key: :logo,
1044 type: :string,
1045 description: "URL of the logo, defaults to Pleroma's logo",
1046 suggestions: ["/static/logo.png"]
1047 },
1048 %{
1049 key: :background,
1050 type: :string,
1051 description:
1052 "URL of the background, unless viewing a user profile with a background that is set",
1053 suggestions: ["/images/city.jpg"]
1054 },
1055 %{
1056 key: :redirectRootNoLogin,
1057 type: :string,
1058 description:
1059 "relative URL which indicates where to redirect when a user isn't logged in",
1060 suggestions: ["/main/all"]
1061 },
1062 %{
1063 key: :redirectRootLogin,
1064 type: :string,
1065 description:
1066 "relative URL which indicates where to redirect when a user is logged in",
1067 suggestions: ["/main/friends"]
1068 },
1069 %{
1070 key: :showInstanceSpecificPanel,
1071 type: :boolean,
1072 description: "Whenether to show the instance's specific panel",
1073 suggestions: [true, false]
1074 },
1075 %{
1076 key: :scopeOptionsEnabled,
1077 type: :boolean,
1078 description: "Enable setting an notice visibility and subject/CW when posting",
1079 suggestions: [true, false]
1080 },
1081 %{
1082 key: :formattingOptionsEnabled,
1083 type: :boolean,
1084 description:
1085 "Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to :instance, allowed_post_formats",
1086 suggestions: [true, false]
1087 },
1088 %{
1089 key: :collapseMessageWithSubject,
1090 type: :boolean,
1091 description:
1092 "When a message has a subject(aka Content Warning), collapse it by default",
1093 suggestions: [true, false]
1094 },
1095 %{
1096 key: :hidePostStats,
1097 type: :boolean,
1098 description: "Hide notices statistics(repeats, favorites, ...)",
1099 suggestions: [true, false]
1100 },
1101 %{
1102 key: :hideUserStats,
1103 type: :boolean,
1104 description:
1105 "Hide profile statistics(posts, posts per day, followers, followings, ...)",
1106 suggestions: [true, false]
1107 },
1108 %{
1109 key: :scopeCopy,
1110 type: :boolean,
1111 description:
1112 "Copy the scope (private/unlisted/public) in replies to posts by default",
1113 suggestions: [true, false]
1114 },
1115 %{
1116 key: :subjectLineBehavior,
1117 type: :string,
1118 description: "Allows changing the default behaviour of subject lines in replies.
1119 `email`: Copy and preprend re:, as in email,
1120 `masto`: Copy verbatim, as in Mastodon,
1121 `noop`: Don't copy the subjec",
1122 suggestions: ["email", "masto", "noop"]
1123 },
1124 %{
1125 key: :alwaysShowSubjectInput,
1126 type: :boolean,
1127 description: "When set to false, auto-hide the subject field when it's empty",
1128 suggestions: [true, false]
1129 }
1130 ]
1131 },
1132 %{
1133 key: :masto_fe,
1134 type: :map,
1135 description: "Settings for Masto FE",
1136 suggestions: [
1137 %{
1138 showInstanceSpecificPanel: true
1139 }
1140 ],
1141 children: [
1142 %{
1143 key: :showInstanceSpecificPanel,
1144 type: :boolean,
1145 description: "Whenether to show the instance's specific panel",
1146 suggestions: [true, false]
1147 }
1148 ]
1149 }
1150 ]
1151 },
1152 %{
1153 group: :pleroma,
1154 key: :assets,
1155 type: :group,
1156 description:
1157 "This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
1158 children: [
1159 %{
1160 key: :mascots,
1161 type: :keyword,
1162 description:
1163 "Keyword of mascots, each element MUST contain both a url and a mime_type key",
1164 suggestions: [
1165 [
1166 pleroma_fox_tan: %{
1167 url: "/images/pleroma-fox-tan-smol.png",
1168 mime_type: "image/png"
1169 },
1170 pleroma_fox_tan_shy: %{
1171 url: "/images/pleroma-fox-tan-shy.png",
1172 mime_type: "image/png"
1173 }
1174 ]
1175 ]
1176 },
1177 %{
1178 key: :default_mascot,
1179 type: :atom,
1180 description:
1181 "This will be used as the default mascot on MastoFE (default: :pleroma_fox_tan)",
1182 suggestions: [
1183 :pleroma_fox_tan
1184 ]
1185 }
1186 ]
1187 },
1188 %{
1189 group: :pleroma,
1190 key: :mrf_simple,
1191 type: :group,
1192 description: "Message Rewrite Facility",
1193 children: [
1194 %{
1195 key: :media_removal,
1196 type: {:list, :string},
1197 description: "List of instances to remove medias from",
1198 suggestions: ["example.com", "*.example.com"]
1199 },
1200 %{
1201 key: :media_nsfw,
1202 type: {:list, :string},
1203 description: "List of instances to put medias as NSFW(sensitive) from",
1204 suggestions: ["example.com", "*.example.com"]
1205 },
1206 %{
1207 key: :federated_timeline_removal,
1208 type: {:list, :string},
1209 description:
1210 "List of instances to remove from Federated (aka The Whole Known Network) Timeline",
1211 suggestions: ["example.com", "*.example.com"]
1212 },
1213 %{
1214 key: :reject,
1215 type: {:list, :string},
1216 description: "List of instances to reject any activities from",
1217 suggestions: ["example.com", "*.example.com"]
1218 },
1219 %{
1220 key: :accept,
1221 type: {:list, :string},
1222 description: "List of instances to accept any activities from",
1223 suggestions: ["example.com", "*.example.com"]
1224 },
1225 %{
1226 key: :report_removal,
1227 type: {:list, :string},
1228 description: "List of instances to reject reports from",
1229 suggestions: ["example.com", "*.example.com"]
1230 },
1231 %{
1232 key: :avatar_removal,
1233 type: {:list, :string},
1234 description: "List of instances to strip avatars from",
1235 suggestions: ["example.com", "*.example.com"]
1236 },
1237 %{
1238 key: :banner_removal,
1239 type: {:list, :string},
1240 description: "List of instances to strip banners from",
1241 suggestions: ["example.com", "*.example.com"]
1242 }
1243 ]
1244 },
1245 %{
1246 group: :pleroma,
1247 key: :mrf_subchain,
1248 type: :group,
1249 description:
1250 "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <>
1251 " All criteria are configured as a map of regular expressions to lists of policy modules.",
1252 children: [
1253 %{
1254 key: :match_actor,
1255 type: :map,
1256 description: "Matches a series of regular expressions against the actor field",
1257 suggestions: [
1258 %{
1259 ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy]
1260 }
1261 ]
1262 }
1263 ]
1264 },
1265 %{
1266 group: :pleroma,
1267 key: :mrf_rejectnonpublic,
1268 type: :group,
1269 description: "",
1270 children: [
1271 %{
1272 key: :allow_followersonly,
1273 type: :boolean,
1274 description: "whether to allow followers-only posts",
1275 suggestions: [true, false]
1276 },
1277 %{
1278 key: :allow_direct,
1279 type: :boolean,
1280 description: "whether to allow direct messages",
1281 suggestions: [true, false]
1282 }
1283 ]
1284 },
1285 %{
1286 group: :pleroma,
1287 key: :mrf_hellthread,
1288 type: :group,
1289 description: "Block messages with too much mentions",
1290 children: [
1291 %{
1292 key: :delist_threshold,
1293 type: :integer,
1294 description:
1295 "Number of mentioned users after which the message gets delisted (the message can still be seen, " <>
1296 " but it will not show up in public timelines and mentioned users won't get notifications about it). Set to 0 to disable",
1297 suggestions: [10]
1298 },
1299 %{
1300 key: :reject_threshold,
1301 type: :integer,
1302 description:
1303 "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable",
1304 suggestions: [20]
1305 }
1306 ]
1307 },
1308 %{
1309 group: :pleroma,
1310 key: :mrf_keyword,
1311 type: :group,
1312 description: "Reject or Word-Replace messages with a keyword or regex",
1313 children: [
1314 %{
1315 key: :reject,
1316 type: [:string, :regex],
1317 description:
1318 "A list of patterns which result in message being rejected, each pattern can be a string or a regular expression",
1319 suggestions: ["foo", ~r/foo/iu]
1320 },
1321 %{
1322 key: :federated_timeline_removal,
1323 type: [:string, :regex],
1324 description:
1325 "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",
1326 suggestions: ["foo", ~r/foo/iu]
1327 },
1328 %{
1329 key: :replace,
1330 type: [{:string, :string}, {:regex, :string}],
1331 description:
1332 "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",
1333 suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}]
1334 }
1335 ]
1336 },
1337 %{
1338 group: :pleroma,
1339 key: :mrf_mention,
1340 type: :group,
1341 description: "Block messages which mention a user",
1342 children: [
1343 %{
1344 key: :actors,
1345 type: {:list, :string},
1346 description: "A list of actors, for which to drop any posts mentioning",
1347 suggestions: [["actor1", "actor2"]]
1348 }
1349 ]
1350 },
1351 %{
1352 group: :pleroma,
1353 key: :mrf_vocabulary,
1354 type: :group,
1355 description: "Filter messages which belong to certain activity vocabularies",
1356 children: [
1357 %{
1358 key: :accept,
1359 type: {:list, :string},
1360 description:
1361 "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted",
1362 suggestions: [["Create", "Follow", "Mention", "Announce", "Like"]]
1363 },
1364 %{
1365 key: :reject,
1366 type: {:list, :string},
1367 description:
1368 "A list of ActivityStreams terms to reject. If empty, no messages are rejected",
1369 suggestions: [["Create", "Follow", "Mention", "Announce", "Like"]]
1370 }
1371 ]
1372 },
1373 # %{
1374 # group: :pleroma,
1375 # key: :mrf_user_allowlist,
1376 # type: :group,
1377 # description:
1378 # "The keys in this section are the domain names that the policy should apply to." <>
1379 # " Each key should be assigned a list of users that should be allowed through by their ActivityPub ID",
1380 # children: [
1381 # ["example.org": ["https://example.org/users/admin"]],
1382 # suggestions: [
1383 # ["example.org": ["https://example.org/users/admin"]]
1384 # ]
1385 # ]
1386 # },
1387 %{
1388 group: :pleroma,
1389 key: :media_proxy,
1390 type: :group,
1391 description: "Media proxy",
1392 children: [
1393 %{
1394 key: :enabled,
1395 type: :boolean,
1396 description: "Enables proxying of remote media to the instance's proxy",
1397 suggestions: [true, false]
1398 },
1399 %{
1400 key: :base_url,
1401 type: :string,
1402 description:
1403 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts",
1404 suggestions: ["https://example.com"]
1405 },
1406 %{
1407 key: :proxy_opts,
1408 type: :keyword,
1409 description: "Options for Pleroma.ReverseProxy",
1410 suggestions: [[max_body_length: 25 * 1_048_576, redirect_on_failure: false]]
1411 },
1412 %{
1413 key: :whitelist,
1414 type: {:list, :string},
1415 description: "List of domains to bypass the mediaproxy",
1416 suggestions: ["example.com"]
1417 }
1418 ]
1419 },
1420 %{
1421 group: :pleroma,
1422 key: :gopher,
1423 type: :group,
1424 description: "Gopher settings",
1425 children: [
1426 %{
1427 key: :enabled,
1428 type: :boolean,
1429 description: "Enables the gopher interface",
1430 suggestions: [true, false]
1431 },
1432 %{
1433 key: :ip,
1434 type: :tuple,
1435 description: "IP address to bind to",
1436 suggestions: [{0, 0, 0, 0}]
1437 },
1438 %{
1439 key: :port,
1440 type: :integer,
1441 description: "Port to bind to",
1442 suggestions: [9999]
1443 },
1444 %{
1445 key: :dstport,
1446 type: :integer,
1447 description: "Port advertised in urls (optional, defaults to port)",
1448 suggestions: [9999]
1449 }
1450 ]
1451 },
1452 %{
1453 group: :pleroma,
1454 key: Pleroma.Web.Endpoint,
1455 type: :group,
1456 description: "Phoenix endpoint configuration",
1457 children: [
1458 %{
1459 key: :http,
1460 type: :keyword,
1461 description: "http protocol configuration",
1462 suggestions: [
1463 [port: 8080, ip: {127, 0, 0, 1}]
1464 ],
1465 children: [
1466 %{
1467 key: :dispatch,
1468 type: {:list, :tuple},
1469 description: "dispatch settings",
1470 suggestions: [
1471 [
1472 {:_,
1473 [
1474 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
1475 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
1476 {Phoenix.Transports.WebSocket,
1477 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
1478 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
1479 ]}
1480 # end copied from config.exs
1481 ]
1482 ]
1483 },
1484 %{
1485 key: :ip,
1486 type: :tuple,
1487 description: "ip",
1488 suggestions: [
1489 {0, 0, 0, 0}
1490 ]
1491 },
1492 %{
1493 key: :port,
1494 type: :integer,
1495 description: "port",
1496 suggestions: [
1497 2020
1498 ]
1499 }
1500 ]
1501 },
1502 %{
1503 key: :url,
1504 type: :keyword,
1505 description: "configuration for generating urls",
1506 suggestions: [
1507 [host: "example.com", port: 2020, scheme: "https"]
1508 ],
1509 children: [
1510 %{
1511 key: :host,
1512 type: :string,
1513 description: "Host",
1514 suggestions: [
1515 "example.com"
1516 ]
1517 },
1518 %{
1519 key: :port,
1520 type: :integer,
1521 description: "port",
1522 suggestions: [
1523 2020
1524 ]
1525 },
1526 %{
1527 key: :scheme,
1528 type: :string,
1529 description: "Scheme",
1530 suggestions: [
1531 "https",
1532 "https"
1533 ]
1534 }
1535 ]
1536 },
1537 %{
1538 key: :instrumenters,
1539 type: {:list, :module},
1540 description: "",
1541 suggestions: [Pleroma.Web.Endpoint.Instrumenter]
1542 },
1543 %{
1544 key: :protocol,
1545 type: :string,
1546 description: "",
1547 suggestions: ["https"]
1548 },
1549 %{
1550 key: :secret_key_base,
1551 type: :string,
1552 description: "",
1553 suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"]
1554 },
1555 %{
1556 key: :signing_salt,
1557 type: :string,
1558 description: "",
1559 suggestions: ["CqaoopA2"]
1560 },
1561 %{
1562 key: :render_errors,
1563 type: :keyword,
1564 description: "",
1565 suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]],
1566 children: [
1567 %{
1568 key: :view,
1569 type: :module,
1570 description: "",
1571 suggestions: [Pleroma.Web.ErrorView]
1572 },
1573 %{
1574 key: :accepts,
1575 type: {:list, :string},
1576 description: "",
1577 suggestions: ["json"]
1578 }
1579 ]
1580 },
1581 %{
1582 key: :pubsub,
1583 type: :keyword,
1584 description: "",
1585 suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]],
1586 children: [
1587 %{
1588 key: :name,
1589 type: :module,
1590 description: "",
1591 suggestions: [Pleroma.PubSub]
1592 },
1593 %{
1594 key: :adapter,
1595 type: :module,
1596 description: "",
1597 suggestions: [Phoenix.PubSub.PG2]
1598 }
1599 ]
1600 },
1601 %{
1602 key: :secure_cookie_flag,
1603 type: :boolean,
1604 description: "",
1605 suggestions: [true, false]
1606 },
1607 %{
1608 key: :extra_cookie_attrs,
1609 type: {:list, :string},
1610 description: "",
1611 suggestions: ["SameSite=Lax"]
1612 }
1613 ]
1614 },
1615 %{
1616 group: :pleroma,
1617 key: :activitypub,
1618 type: :group,
1619 description: "ActivityPub-related settings",
1620 children: [
1621 %{
1622 key: :unfollow_blocked,
1623 type: :boolean,
1624 description: "Whether blocks result in people getting unfollowed",
1625 suggestions: [true, false]
1626 },
1627 %{
1628 key: :outgoing_blocks,
1629 type: :boolean,
1630 description: "Whether to federate blocks to other instances",
1631 suggestions: [true, false]
1632 },
1633 %{
1634 key: :sign_object_fetches,
1635 type: :boolean,
1636 description: "Sign object fetches with HTTP signatures",
1637 suggestions: [true, false]
1638 },
1639 %{
1640 key: :follow_handshake_timeout,
1641 type: :integer,
1642 description: "Following handshake timeout",
1643 suggestions: [500]
1644 }
1645 ]
1646 },
1647 %{
1648 group: :pleroma,
1649 key: :http_security,
1650 type: :group,
1651 description: "HTTP security settings",
1652 children: [
1653 %{
1654 key: :enabled,
1655 type: :boolean,
1656 description: "Whether the managed content security policy is enabled",
1657 suggestions: [true, false]
1658 },
1659 %{
1660 key: :sts,
1661 type: :boolean,
1662 description: "Whether to additionally send a Strict-Transport-Security header",
1663 suggestions: [true, false]
1664 },
1665 %{
1666 key: :sts_max_age,
1667 type: :integer,
1668 description: "The maximum age for the Strict-Transport-Security header if sent",
1669 suggestions: [31_536_000]
1670 },
1671 %{
1672 key: :ct_max_age,
1673 type: :integer,
1674 description: "The maximum age for the Expect-CT header if sent",
1675 suggestions: [2_592_000]
1676 },
1677 %{
1678 key: :referrer_policy,
1679 type: :string,
1680 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1681 suggestions: ["same-origin", "no-referrer"]
1682 },
1683 %{
1684 key: :report_uri,
1685 type: :string,
1686 description: "Adds the specified url to report-uri and report-to group in CSP header",
1687 suggestions: ["https://example.com/report-uri"]
1688 }
1689 ]
1690 },
1691 %{
1692 group: :web_push_encryption,
1693 key: :vapid_details,
1694 type: :group,
1695 description:
1696 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it",
1697 children: [
1698 %{
1699 key: :subject,
1700 type: :string,
1701 description:
1702 "a mailto link for the administrative contact." <>
1703 " It's best if this email is not a personal email address, but rather a group email so that if a person leaves an organization," <>
1704 " is unavailable for an extended period, or otherwise can't respond, someone else on the list can",
1705 suggestions: ["Subject"]
1706 },
1707 %{
1708 key: :public_key,
1709 type: :string,
1710 description: "VAPID public key",
1711 suggestions: ["Public key"]
1712 },
1713 %{
1714 key: :private_key,
1715 type: :string,
1716 description: "VAPID private keyn",
1717 suggestions: ["Private key"]
1718 }
1719 ]
1720 },
1721 %{
1722 group: :pleroma,
1723 key: Pleroma.Captcha,
1724 type: :group,
1725 description: "Captcha-related settings",
1726 children: [
1727 %{
1728 key: :enabled,
1729 type: :boolean,
1730 description: "Whether the captcha should be shown on registration",
1731 suggestions: [true, false]
1732 },
1733 %{
1734 key: :method,
1735 type: :module,
1736 description: "The method/service to use for captcha",
1737 suggestions: [Pleroma.Captcha.Kocaptcha]
1738 },
1739 %{
1740 key: :seconds_valid,
1741 type: :integer,
1742 description: "The time in seconds for which the captcha is valid",
1743 suggestions: [60]
1744 }
1745 ]
1746 },
1747 %{
1748 group: :pleroma,
1749 key: Pleroma.Captcha.Kocaptcha,
1750 type: :group,
1751 description:
1752 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1753 " here: https://github.com/koto-bank/kocaptcha. The default endpoint https://captcha.kotobank.ch is hosted by the developer",
1754 children: [
1755 %{
1756 key: :endpoint,
1757 type: :string,
1758 description: "the kocaptcha endpoint to use",
1759 suggestions: ["https://captcha.kotobank.ch"]
1760 }
1761 ]
1762 },
1763 %{
1764 group: :pleroma,
1765 type: :group,
1766 description:
1767 "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",
1768 children: [
1769 %{
1770 key: :admin_token,
1771 type: :string,
1772 description: "Token",
1773 suggestions: ["some_random_token"]
1774 }
1775 ]
1776 },
1777 %{
1778 group: :pleroma_job_queue,
1779 key: :queues,
1780 type: :group,
1781 description: "Pleroma Job Queue configuration: a list of queues with maximum concurrent jobs",
1782 children: [
1783 %{
1784 key: :federator_outgoing,
1785 type: :integer,
1786 description: "Outgoing federation queue",
1787 suggestions: [50]
1788 },
1789 %{
1790 key: :federator_incoming,
1791 type: :integer,
1792 description: "Incoming federation queue",
1793 suggestions: [50]
1794 },
1795 %{
1796 key: :mailer,
1797 type: :integer,
1798 description: "Email sender queue, see Pleroma.Emails.Mailer",
1799 suggestions: [10]
1800 },
1801 %{
1802 key: :web_push,
1803 type: :integer,
1804 description: "Web push notifications queue",
1805 suggestions: [50]
1806 },
1807 %{
1808 key: :transmogrifier,
1809 type: :integer,
1810 description: "Transmogrifier queue",
1811 suggestions: [20]
1812 },
1813 %{
1814 key: :scheduled_activities,
1815 type: :integer,
1816 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
1817 suggestions: [10]
1818 },
1819 %{
1820 key: :activity_expiration,
1821 type: :integer,
1822 description: "Activity expiration queue",
1823 suggestions: [10]
1824 },
1825 %{
1826 key: :background,
1827 type: :integer,
1828 description: "Background queue",
1829 suggestions: [5]
1830 }
1831 ]
1832 },
1833 %{
1834 group: :pleroma,
1835 key: Pleroma.Web.Federator.RetryQueue,
1836 type: :group,
1837 description: "",
1838 children: [
1839 %{
1840 key: :enabled,
1841 type: :boolean,
1842 description: "If set to true, failed federation jobs will be retried",
1843 suggestions: [true, false]
1844 },
1845 %{
1846 key: :max_jobs,
1847 type: :integer,
1848 description: "The maximum amount of parallel federation jobs running at the same time",
1849 suggestions: [20]
1850 },
1851 %{
1852 key: :initial_timeout,
1853 type: :integer,
1854 description: "The initial timeout in seconds",
1855 suggestions: [30]
1856 },
1857 %{
1858 key: :max_retries,
1859 type: :integer,
1860 description: "The maximum number of times a federation job is retried",
1861 suggestions: [5]
1862 }
1863 ]
1864 },
1865 %{
1866 group: :pleroma,
1867 key: Pleroma.Web.Metadata,
1868 type: :group,
1869 decsription: "Metadata-related settings",
1870 children: [
1871 %{
1872 key: :providers,
1873 type: {:list, :module},
1874 description: "List of metadata providers to enable",
1875 suggestions: [
1876 [
1877 Pleroma.Web.Metadata.Providers.OpenGraph,
1878 Pleroma.Web.Metadata.Providers.TwitterCard,
1879 Pleroma.Web.Metadata.Providers.RelMe
1880 ]
1881 ]
1882 },
1883 %{
1884 key: :unfurl_nsfw,
1885 type: :boolean,
1886 description: "If set to true nsfw attachments will be shown in previews",
1887 suggestions: [
1888 true,
1889 false
1890 ]
1891 }
1892 ]
1893 },
1894 %{
1895 group: :pleroma,
1896 key: :rich_media,
1897 type: :group,
1898 description: "",
1899 children: [
1900 %{
1901 key: :enabled,
1902 type: :boolean,
1903 description:
1904 "if enabled the instance will parse metadata from attached links to generate link previews",
1905 suggestions: [true, false]
1906 },
1907 %{
1908 key: :ignore_hosts,
1909 type: {:list, :string},
1910 description: "list of hosts which will be ignored by the metadata parser",
1911 suggestions: [["accounts.google.com", "xss.website"]]
1912 },
1913 %{
1914 key: :ignore_tld,
1915 type: {:list, :string},
1916 description: "list TLDs (top-level domains) which will ignore for parse metadata",
1917 suggestions: [["local", "localdomain", "lan"]]
1918 },
1919 %{
1920 key: :parsers,
1921 type: {:list, :module},
1922 description: "list of Rich Media parsers",
1923 suggestions: [
1924 Generator.richmedia_parsers()
1925 ]
1926 },
1927 %{
1928 key: :ttl_setters,
1929 type: {:list, :module},
1930 description: "list of rich media ttl setters",
1931 suggestions: [
1932 [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
1933 ]
1934 }
1935 ]
1936 },
1937 %{
1938 group: :pleroma,
1939 key: :fetch_initial_posts,
1940 type: :group,
1941 description: "Fetching initial posts settings",
1942 children: [
1943 %{
1944 key: :enabled,
1945 type: :boolean,
1946 description:
1947 "if enabled, when a new user is federated with, fetch some of their latest posts",
1948 suggestions: [true, false]
1949 },
1950 %{
1951 key: :pages,
1952 type: :integer,
1953 description: "the amount of pages to fetch",
1954 suggestions: [5]
1955 }
1956 ]
1957 },
1958 %{
1959 group: :auto_linker,
1960 key: :opts,
1961 type: :group,
1962 description: "Configuration for the auto_linker library",
1963 children: [
1964 %{
1965 key: :class,
1966 type: [:string, false],
1967 description: "specify the class to be added to the generated link. false to clear",
1968 suggestions: ["auto-linker", false]
1969 },
1970 %{
1971 key: :rel,
1972 type: [:string, false],
1973 description: "override the rel attribute. false to clear",
1974 suggestions: ["noopener noreferrer", false]
1975 },
1976 %{
1977 key: :new_window,
1978 type: :boolean,
1979 description: "set to false to remove target='_blank' attribute",
1980 suggestions: [true, false]
1981 },
1982 %{
1983 key: :scheme,
1984 type: :boolean,
1985 description: "Set to true to link urls with schema http://google.com",
1986 suggestions: [true, false]
1987 },
1988 %{
1989 key: :truncate,
1990 type: [:integer, false],
1991 description:
1992 "Set to a number to truncate urls longer then the number. Truncated urls will end in `..`",
1993 suggestions: [15, false]
1994 },
1995 %{
1996 key: :strip_prefix,
1997 type: :boolean,
1998 description: "Strip the scheme prefix",
1999 suggestions: [true, false]
2000 },
2001 %{
2002 key: :extra,
2003 type: :boolean,
2004 description: "link urls with rarely used schemes (magnet, ipfs, irc, etc.)",
2005 suggestions: [true, false]
2006 }
2007 ]
2008 },
2009 %{
2010 group: :pleroma,
2011 key: Pleroma.ScheduledActivity,
2012 type: :group,
2013 description: "Scheduled activities settings",
2014 children: [
2015 %{
2016 key: :daily_user_limit,
2017 type: :integer,
2018 description:
2019 "the number of scheduled activities a user is allowed to create in a single day (Default: 25)",
2020 suggestions: [25]
2021 },
2022 %{
2023 key: :total_user_limit,
2024 type: :integer,
2025 description:
2026 "the number of scheduled activities a user is allowed to create in total (Default: 300)",
2027 suggestions: [300]
2028 },
2029 %{
2030 key: :enabled,
2031 type: :boolean,
2032 description: "whether scheduled activities are sent to the job queue to be executed",
2033 suggestions: [true, false]
2034 }
2035 ]
2036 },
2037 %{
2038 group: :pleroma,
2039 key: Pleroma.ActivityExpiration,
2040 type: :group,
2041 description: "Expired activity settings",
2042 children: [
2043 %{
2044 key: :enabled,
2045 type: :boolean,
2046 description: "whether expired activities will be sent to the job queue to be deleted",
2047 suggestions: [true, false]
2048 }
2049 ]
2050 },
2051 %{
2052 group: :pleroma,
2053 type: :group,
2054 description: "Authenticator",
2055 children: [
2056 %{
2057 key: Pleroma.Web.Auth.Authenticator,
2058 type: :module,
2059 description: "",
2060 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2061 }
2062 ]
2063 },
2064 %{
2065 group: :pleroma,
2066 key: :ldap,
2067 type: :group,
2068 description:
2069 "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2070 " will be verified by trying to authenticate (bind) to an LDAP server." <>
2071 " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2072 " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2073 children: [
2074 %{
2075 key: :enabled,
2076 type: :boolean,
2077 description: "enables LDAP authentication",
2078 suggestions: [true, false]
2079 },
2080 %{
2081 key: :host,
2082 type: :string,
2083 description: "LDAP server hostname",
2084 suggestions: ["localhosts"]
2085 },
2086 %{
2087 key: :port,
2088 type: :integer,
2089 description: "LDAP port, e.g. 389 or 636",
2090 suggestions: [389, 636]
2091 },
2092 %{
2093 key: :ssl,
2094 type: :boolean,
2095 description: "true to use SSL, usually implies the port 636",
2096 suggestions: [true, false]
2097 },
2098 %{
2099 key: :sslopts,
2100 type: :keyword,
2101 description: "additional SSL options",
2102 suggestions: []
2103 },
2104 %{
2105 key: :tls,
2106 type: :boolean,
2107 description: "true to start TLS, usually implies the port 389",
2108 suggestions: [true, false]
2109 },
2110 %{
2111 key: :tlsopts,
2112 type: :keyword,
2113 description: "additional TLS options",
2114 suggestions: []
2115 },
2116 %{
2117 key: :base,
2118 type: :string,
2119 description: "LDAP base, e.g. \"dc=example,dc=com\"",
2120 suggestions: ["dc=example,dc=com"]
2121 },
2122 %{
2123 key: :uid,
2124 type: :string,
2125 description:
2126 "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2127 suggestions: ["cn"]
2128 }
2129 ]
2130 },
2131 %{
2132 group: :pleroma,
2133 key: :auth,
2134 type: :group,
2135 description: "Authentication / authorization settings",
2136 children: [
2137 %{
2138 key: :auth_template,
2139 type: :string,
2140 description:
2141 "authentication form template. By default it's show.html which corresponds to lib/pleroma/web/templates/o_auth/o_auth/show.html.ee",
2142 suggestions: ["show.html"]
2143 },
2144 %{
2145 key: :oauth_consumer_template,
2146 type: :string,
2147 description:
2148 "OAuth consumer mode authentication form template. By default it's consumer.html which corresponds to" <>
2149 " lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex",
2150 suggestions: ["consumer.html"]
2151 },
2152 %{
2153 key: :oauth_consumer_strategies,
2154 type: :string,
2155 description:
2156 "the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2157 " Each entry in this space-delimited string should be of format <strategy> or <strategy>:<dependency>" <>
2158 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2159 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2160 }
2161 ]
2162 },
2163 %{
2164 group: :pleroma,
2165 key: :email_notifications,
2166 type: :group,
2167 description: "Email notifications settings",
2168 children: [
2169 %{
2170 key: :digest,
2171 type: :map,
2172 description:
2173 "emails of \"what you've missed\" for users who have been inactive for a while",
2174 suggestions: [
2175 %{
2176 active: false,
2177 schedule: "0 0 * * 0",
2178 interval: 7,
2179 inactivity_threshold: 7
2180 }
2181 ],
2182 children: [
2183 %{
2184 key: :active,
2185 type: :boolean,
2186 description: "globally enable or disable digest emails",
2187 suggestions: [true, false]
2188 },
2189 %{
2190 key: :schedule,
2191 type: :string,
2192 description:
2193 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\"",
2194 suggestions: ["0 0 * * 0"]
2195 },
2196 %{
2197 key: :interval,
2198 type: :ininteger,
2199 description: "Minimum interval between digest emails to one user",
2200 suggestions: [7]
2201 },
2202 %{
2203 key: :inactivity_threshold,
2204 type: :integer,
2205 description: "Minimum user inactivity threshold",
2206 suggestions: [7]
2207 }
2208 ]
2209 }
2210 ]
2211 },
2212 %{
2213 group: :pleroma,
2214 key: Pleroma.Emails.UserEmail,
2215 type: :group,
2216 description: "Email template settings",
2217 children: [
2218 %{
2219 key: :logo,
2220 # type: [:string, nil],
2221 description: "a path to a custom logo. Set it to nil to use the default Pleroma logo",
2222 suggestions: ["some/path/logo.png", nil]
2223 },
2224 %{
2225 key: :styling,
2226 type: :map,
2227 description: "a map with color settings for email templates.",
2228 suggestions: [
2229 %{
2230 link_color: "#d8a070",
2231 background_color: "#2C3645",
2232 content_background_color: "#1B2635",
2233 header_color: "#d8a070",
2234 text_color: "#b9b9ba",
2235 text_muted_color: "#b9b9ba"
2236 }
2237 ],
2238 children: [
2239 %{
2240 key: :link_color,
2241 type: :string,
2242 description: "",
2243 suggestions: ["#d8a070"]
2244 },
2245 %{
2246 key: :background_color,
2247 type: :string,
2248 description: "",
2249 suggestions: ["#2C3645"]
2250 },
2251 %{
2252 key: :content_background_color,
2253 type: :string,
2254 description: "",
2255 suggestions: ["#1B2635"]
2256 },
2257 %{
2258 key: :header_color,
2259 type: :string,
2260 description: "",
2261 suggestions: ["#d8a070"]
2262 },
2263 %{
2264 key: :text_color,
2265 type: :string,
2266 description: "",
2267 suggestions: ["#b9b9ba"]
2268 },
2269 %{
2270 key: :text_muted_color,
2271 type: :string,
2272 description: "",
2273 suggestions: ["#b9b9ba"]
2274 }
2275 ]
2276 }
2277 ]
2278 },
2279 %{
2280 group: :pleroma,
2281 key: :oauth2,
2282 type: :group,
2283 description: "Configure OAuth 2 provider capabilities",
2284 children: [
2285 %{
2286 key: :token_expires_in,
2287 type: :integer,
2288 description: "The lifetime in seconds of the access token",
2289 suggestions: [600]
2290 },
2291 %{
2292 key: :issue_new_refresh_token,
2293 type: :boolean,
2294 description:
2295 "Keeps old refresh token or generate new refresh token when to obtain an access token",
2296 suggestions: [true, false]
2297 },
2298 %{
2299 key: :clean_expired_tokens,
2300 type: :boolean,
2301 description: "Enable a background job to clean expired oauth tokens. Defaults to false",
2302 suggestions: [true, false]
2303 },
2304 %{
2305 key: :clean_expired_tokens_interval,
2306 type: :integer,
2307 description:
2308 "Interval to run the job to clean expired tokens. Defaults to 86_400_000 (24 hours).",
2309 suggestions: [86_400_000]
2310 }
2311 ]
2312 },
2313 %{
2314 group: :pleroma,
2315 key: :emoji,
2316 type: :group,
2317 description: "",
2318 children: [
2319 %{
2320 key: :shortcode_globs,
2321 type: {:list, :string},
2322 description: "Location of custom emoji files. * can be used as a wildcard",
2323 suggestions: [["/emoji/custom/**/*.png"]]
2324 },
2325 %{
2326 key: :pack_extensions,
2327 type: {:list, :string},
2328 description:
2329 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2330 suggestions: [[".png", ".gif"]]
2331 },
2332 %{
2333 key: :groups,
2334 type: :keyword,
2335 description:
2336 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname" <>
2337 " and the value the location or array of locations. * can be used as a wildcard",
2338 suggestions: [
2339 [
2340 # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
2341 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2342 ]
2343 ]
2344 },
2345 %{
2346 key: :default_manifest,
2347 type: :string,
2348 description:
2349 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2350 " Currently only one manifest can be added (no arrays)",
2351 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2352 }
2353 ]
2354 },
2355 %{
2356 group: :pleroma,
2357 key: :database,
2358 type: :group,
2359 description: "Database related settings",
2360 children: [
2361 %{
2362 key: :rum_enabled,
2363 type: :boolean,
2364 description: "If RUM indexes should be used. Defaults to false",
2365 suggestions: [true, false]
2366 }
2367 ]
2368 },
2369 %{
2370 group: :pleroma,
2371 key: :rate_limit,
2372 type: :group,
2373 description: "Rate limit settings. This is an advanced feature and disabled by default.",
2374 children: [
2375 %{
2376 key: :search,
2377 type: [:tuple, {:list, :tuple}],
2378 description: "for the search requests (account & status search etc.)",
2379 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2380 },
2381 %{
2382 key: :app_account_creation,
2383 type: [:tuple, {:list, :tuple}],
2384 description: "for registering user accounts from the same IP address",
2385 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2386 },
2387 %{
2388 key: :relations_actions,
2389 type: [:tuple, {:list, :tuple}],
2390 description: "for actions on relations with all users (follow, unfollow)",
2391 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2392 },
2393 %{
2394 key: :relation_id_action,
2395 type: [:tuple, {:list, :tuple}],
2396 description: "for actions on relation with a specific user (follow, unfollow)",
2397 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2398 },
2399 %{
2400 key: :statuses_actions,
2401 type: [:tuple, {:list, :tuple}],
2402 description:
2403 "for create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2404 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2405 },
2406 %{
2407 key: :status_id_action,
2408 type: [:tuple, {:list, :tuple}],
2409 description:
2410 "for fav / unfav or reblog / unreblog actions on the same status by the same user",
2411 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2412 }
2413 ]
2414 },
2415 %{
2416 group: :esshd,
2417 type: :group,
2418 description:
2419 "To enable simple command line interface accessible over ssh, add a setting like this to your configuration file",
2420 children: [
2421 %{
2422 key: :enabled,
2423 type: :boolean,
2424 description: "Enables ssh",
2425 suggestions: [true, false]
2426 },
2427 %{
2428 key: :priv_dir,
2429 type: :string,
2430 description: "Dir with ssh keys",
2431 suggestions: ["/some/path/ssh_keys"]
2432 },
2433 %{
2434 key: :handler,
2435 type: :string,
2436 description: "Handler module",
2437 suggestions: ["Pleroma.BBS.Handler"]
2438 },
2439 %{
2440 key: :port,
2441 type: :integer,
2442 description: "Port to connect",
2443 suggestions: [10_022]
2444 },
2445 %{
2446 key: :password_authenticator,
2447 type: :string,
2448 description: "Authenticator module",
2449 suggestions: ["Pleroma.BBS.Authenticator"]
2450 }
2451 ]
2452 },
2453 %{
2454 group: :mime,
2455 type: :group,
2456 description: "Mime types",
2457 children: [
2458 %{
2459 key: :types,
2460 type: :map,
2461 description: "",
2462 suggestions: [
2463 %{
2464 "application/xml" => ["xml"],
2465 "application/xrd+xml" => ["xrd+xml"],
2466 "application/jrd+json" => ["jrd+json"],
2467 "application/activity+json" => ["activity+json"],
2468 "application/ld+json" => ["activity+json"]
2469 }
2470 ],
2471 children: [
2472 %{
2473 key: "application/xml",
2474 type: {:list, :string},
2475 description: "",
2476 suggestions: [["xml"]]
2477 },
2478 %{
2479 key: "application/xrd+xml",
2480 type: {:list, :string},
2481 description: "",
2482 suggestions: [["xrd+xml"]]
2483 },
2484 %{
2485 key: "application/jrd+json",
2486 type: {:list, :string},
2487 description: "",
2488 suggestions: [["jrd+json"]]
2489 },
2490 %{
2491 key: "application/activity+json",
2492 type: {:list, :string},
2493 description: "",
2494 suggestions: [["activity+json"]]
2495 },
2496 %{
2497 key: "application/ld+json",
2498 type: {:list, :string},
2499 description: "",
2500 suggestions: [["activity+json"]]
2501 }
2502 ]
2503 }
2504 ]
2505 },
2506 %{
2507 group: :tesla,
2508 type: :group,
2509 description: "Tesla settings",
2510 children: [
2511 %{
2512 key: :adapter,
2513 type: :module,
2514 description: "Tesla adapter",
2515 suggestions: [Tesla.Adapter.Hackney]
2516 }
2517 ]
2518 },
2519 %{
2520 group: :pleroma,
2521 key: :chat,
2522 type: :group,
2523 description: "Pleroma chat settings",
2524 children: [
2525 %{
2526 key: :enabled,
2527 type: :boolean,
2528 description: "",
2529 suggestions: [true, false]
2530 }
2531 ]
2532 },
2533 %{
2534 group: :pleroma,
2535 key: :suggestions,
2536 type: :group,
2537 description: "",
2538 children: [
2539 %{
2540 key: :enabled,
2541 type: :boolean,
2542 description: "Enables suggestions",
2543 suggestions: []
2544 },
2545 %{
2546 key: :third_party_engine,
2547 type: :string,
2548 description: "URL for third party engine",
2549 suggestions: [
2550 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}"
2551 ]
2552 },
2553 %{
2554 key: :timeout,
2555 type: :integer,
2556 description: "Request timeout to third party engine",
2557 suggestions: [300_000]
2558 },
2559 %{
2560 key: :limit,
2561 type: :integer,
2562 description: "Limit for suggestions",
2563 suggestions: [40]
2564 },
2565 %{
2566 key: :web,
2567 type: :string,
2568 description: "",
2569 suggestions: ["https://vinayaka.distsn.org"]
2570 }
2571 ]
2572 },
2573 %{
2574 group: :prometheus,
2575 key: Pleroma.Web.Endpoint.MetricsExporter,
2576 type: :group,
2577 description: "Prometheus settings",
2578 children: [
2579 %{
2580 key: :path,
2581 type: :string,
2582 description: "API endpoint with metrics",
2583 suggestions: ["/api/pleroma/app_metrics"]
2584 }
2585 ]
2586 },
2587 %{
2588 group: :http_signatures,
2589 type: :group,
2590 description: "HTTP Signatures settings",
2591 children: [
2592 %{
2593 key: :adapter,
2594 type: :module,
2595 description: "",
2596 suggestions: [Pleroma.Signature]
2597 }
2598 ]
2599 },
2600 %{
2601 group: :pleroma,
2602 key: Pleroma.Uploaders.MDII,
2603 type: :group,
2604 description: "",
2605 children: [
2606 %{
2607 key: :cgi,
2608 type: :string,
2609 description: "",
2610 suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"]
2611 },
2612 %{
2613 key: :files,
2614 type: :string,
2615 description: "",
2616 suggestions: ["https://mdii.sakura.ne.jp"]
2617 }
2618 ]
2619 },
2620 %{
2621 group: :pleroma,
2622 key: :http,
2623 type: :group,
2624 description: "HTTP settings",
2625 children: [
2626 %{
2627 key: :proxy_url,
2628 type: [:string, :atom, nil],
2629 description: "",
2630 suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil]
2631 },
2632 %{
2633 key: :send_user_agent,
2634 type: :boolean,
2635 description: "",
2636 suggestions: [true, false]
2637 },
2638 %{
2639 key: :adapter,
2640 type: :keyword,
2641 description: "",
2642 suggestions: [
2643 [
2644 ssl_options: [
2645 # Workaround for remote server certificate chain issues
2646 partial_chain: &:hackney_connect.partial_chain/1,
2647 # We don't support TLS v1.3 yet
2648 versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
2649 ]
2650 ]
2651 ]
2652 }
2653 ]
2654 },
2655 %{
2656 group: :pleroma,
2657 key: :markup,
2658 type: :group,
2659 description: "",
2660 children: [
2661 %{
2662 key: :allow_inline_images,
2663 type: :boolean,
2664 description: "",
2665 suggestions: [true, false]
2666 },
2667 %{
2668 key: :allow_headings,
2669 type: :boolean,
2670 description: "",
2671 suggestions: [true, false]
2672 },
2673 %{
2674 key: :allow_tables,
2675 type: :boolean,
2676 description: "",
2677 suggestions: [true, false]
2678 },
2679 %{
2680 key: :allow_fonts,
2681 type: :boolean,
2682 description: "",
2683 suggestions: [true, false]
2684 },
2685 %{
2686 key: :scrub_policy,
2687 type: {:list, :module},
2688 description: "",
2689 suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]]
2690 }
2691 ]
2692 },
2693 %{
2694 group: :pleroma,
2695 key: :user,
2696 type: :group,
2697 description: "",
2698 children: [
2699 %{
2700 key: :deny_follow_blocked,
2701 type: :boolean,
2702 description: "",
2703 suggestions: [true, false]
2704 }
2705 ]
2706 },
2707 %{
2708 group: :pleroma,
2709 key: :mrf_normalize_markup,
2710 type: :group,
2711 description: "",
2712 children: [
2713 %{
2714 key: :scrub_policy,
2715 type: :module,
2716 description: "",
2717 suggestions: [Pleroma.HTML.Scrubber.Default]
2718 }
2719 ]
2720 },
2721 %{
2722 group: :pleroma,
2723 key: Pleroma.User,
2724 type: :group,
2725 description: "",
2726 children: [
2727 %{
2728 key: :restricted_nicknames,
2729 type: {:list, :string},
2730 description: "",
2731 suggestions: [
2732 [
2733 ".well-known",
2734 "~",
2735 "about",
2736 "activities",
2737 "api",
2738 "auth",
2739 "check_password",
2740 "dev",
2741 "friend-requests",
2742 "inbox",
2743 "internal",
2744 "main",
2745 "media",
2746 "nodeinfo",
2747 "notice",
2748 "oauth",
2749 "objects",
2750 "ostatus_subscribe",
2751 "pleroma",
2752 "proxy",
2753 "push",
2754 "registration",
2755 "relay",
2756 "settings",
2757 "status",
2758 "tag",
2759 "user-search",
2760 "user_exists",
2761 "users",
2762 "web"
2763 ]
2764 ]
2765 }
2766 ]
2767 },
2768 %{
2769 group: :cors_plug,
2770 type: :group,
2771 description: "",
2772 children: [
2773 %{
2774 key: :max_age,
2775 type: :integer,
2776 description: "",
2777 suggestions: [86_400]
2778 },
2779 %{
2780 key: :methods,
2781 type: {:list, :string},
2782 description: "",
2783 suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]]
2784 },
2785 %{
2786 key: :expose,
2787 type: :string,
2788 description: "",
2789 suggestions: [
2790 [
2791 "Link",
2792 "X-RateLimit-Reset",
2793 "X-RateLimit-Limit",
2794 "X-RateLimit-Remaining",
2795 "X-Request-Id",
2796 "Idempotency-Key"
2797 ]
2798 ]
2799 },
2800 %{
2801 key: :credentials,
2802 type: :boolean,
2803 description: "",
2804 suggestions: [true, false]
2805 },
2806 %{
2807 key: :headers,
2808 type: {:list, :string},
2809 description: "",
2810 suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]]
2811 }
2812 ]
2813 }
2814 ]