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