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