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