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