e280ed8cf57665e216731f3edc92c1ae6792f0be
[akkoma] / config / description.exs
1 use Mix.Config
2
3 websocket_config = [
4 path: "/websocket",
5 serializer: [
6 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
7 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
8 ],
9 timeout: 60_000,
10 transport_log: false,
11 compress: false
12 ]
13
14 installed_frontend_options = [
15 %{
16 key: "name",
17 label: "Name",
18 type: :string,
19 description:
20 "Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
21 },
22 %{
23 key: "ref",
24 label: "Reference",
25 type: :string,
26 description:
27 "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values."
28 }
29 ]
30
31 frontend_options = [
32 %{
33 key: "name",
34 label: "Name",
35 type: :string,
36 description: "Name of the frontend."
37 },
38 %{
39 key: "ref",
40 label: "Reference",
41 type: :string,
42 description: "Reference of the frontend to be used."
43 },
44 %{
45 key: "git",
46 label: "Git Repository URL",
47 type: :string,
48 description: "URL of the git repository of the frontend"
49 },
50 %{
51 key: "build_url",
52 label: "Build URL",
53 type: :string,
54 description:
55 "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
56 example: "https://some.url/builds/${ref}.zip"
57 },
58 %{
59 key: "build_dir",
60 label: "Build directory",
61 type: :string,
62 description: "The directory inside the zip file "
63 },
64 %{
65 key: "custom-http-headers",
66 label: "Custom HTTP headers",
67 type: {:list, :string},
68 description: "The custom HTTP headers for the frontend"
69 }
70 ]
71
72 config :pleroma, :config_description, [
73 %{
74 group: :pleroma,
75 key: Pleroma.Upload,
76 type: :group,
77 description: "Upload general settings",
78 children: [
79 %{
80 key: :uploader,
81 type: :module,
82 description: "Module which will be used for uploads",
83 suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
84 },
85 %{
86 key: :filters,
87 type: {:list, :module},
88 description:
89 "List of filter modules for uploads. Module names are shortened (removed leading `Pleroma.Upload.Filter.` part), but on adding custom module you need to use full name.",
90 suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
91 },
92 %{
93 key: :link_name,
94 type: :boolean,
95 description:
96 "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`."
97 },
98 %{
99 key: :base_url,
100 label: "Base URL",
101 type: :string,
102 description:
103 "Base URL for the uploads. Required if you use a CDN or host attachments under a different domain.",
104 suggestions: [
105 "https://cdn-host.com"
106 ]
107 },
108 %{
109 key: :proxy_remote,
110 type: :boolean,
111 description: """
112 Proxy requests to the remote uploader.\n
113 Useful if media upload endpoint is not internet accessible.
114 """
115 },
116 %{
117 key: :filename_display_max_length,
118 type: :integer,
119 description: "Set max length of a filename to display. 0 = no limit. Default: 30"
120 }
121 ]
122 },
123 %{
124 group: :pleroma,
125 key: Pleroma.Uploaders.Local,
126 type: :group,
127 description: "Local uploader-related settings",
128 children: [
129 %{
130 key: :uploads,
131 type: :string,
132 description: "Path where user's uploads will be saved",
133 suggestions: [
134 "uploads"
135 ]
136 }
137 ]
138 },
139 %{
140 group: :pleroma,
141 key: Pleroma.Uploaders.S3,
142 type: :group,
143 description: "S3 uploader-related settings",
144 children: [
145 %{
146 key: :bucket,
147 type: :string,
148 description: "S3 bucket",
149 suggestions: [
150 "bucket"
151 ]
152 },
153 %{
154 key: :bucket_namespace,
155 type: :string,
156 description: "S3 bucket namespace",
157 suggestions: ["pleroma"]
158 },
159 %{
160 key: :truncated_namespace,
161 type: :string,
162 description:
163 "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
164 " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url."
165 },
166 %{
167 key: :streaming_enabled,
168 type: :boolean,
169 description:
170 "Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems."
171 }
172 ]
173 },
174 %{
175 group: :pleroma,
176 key: Pleroma.Upload.Filter.Mogrify,
177 type: :group,
178 description: "Uploads mogrify filter settings",
179 children: [
180 %{
181 key: :args,
182 type: [:string, {:list, :string}, {:list, :tuple}],
183 description:
184 "List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
185 "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
186 suggestions: [
187 "strip",
188 "auto-orient",
189 {"implode", "1"}
190 ]
191 }
192 ]
193 },
194 %{
195 group: :pleroma,
196 key: Pleroma.Upload.Filter.AnonymizeFilename,
197 type: :group,
198 description: "Filter replaces the filename of the upload",
199 children: [
200 %{
201 key: :text,
202 type: :string,
203 description:
204 "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
205 " filename extension by using {extension}, for example custom-file-name.{extension}.",
206 suggestions: [
207 "custom-file-name.{extension}"
208 ]
209 }
210 ]
211 },
212 %{
213 group: :pleroma,
214 key: Pleroma.Emails.Mailer,
215 type: :group,
216 description: "Mailer-related settings",
217 children: [
218 %{
219 key: :enabled,
220 label: "Mailer Enabled",
221 type: :boolean
222 },
223 %{
224 key: :adapter,
225 type: :module,
226 description:
227 "One of the mail adapters listed in [Swoosh documentation](https://hexdocs.pm/swoosh/Swoosh.html#module-adapters)",
228 suggestions: [
229 Swoosh.Adapters.AmazonSES,
230 Swoosh.Adapters.Dyn,
231 Swoosh.Adapters.Gmail,
232 Swoosh.Adapters.Mailgun,
233 Swoosh.Adapters.Mailjet,
234 Swoosh.Adapters.Mandrill,
235 Swoosh.Adapters.Postmark,
236 Swoosh.Adapters.SMTP,
237 Swoosh.Adapters.Sendgrid,
238 Swoosh.Adapters.Sendmail,
239 Swoosh.Adapters.SocketLabs,
240 Swoosh.Adapters.SparkPost
241 ]
242 },
243 %{
244 group: {:subgroup, Swoosh.Adapters.SMTP},
245 key: :relay,
246 type: :string,
247 description: "Hostname or IP address",
248 suggestions: ["smtp.example.com"]
249 },
250 %{
251 group: {:subgroup, Swoosh.Adapters.SMTP},
252 key: :port,
253 type: :integer,
254 description: "SMTP port",
255 suggestions: ["1025"]
256 },
257 %{
258 group: {:subgroup, Swoosh.Adapters.SMTP},
259 key: :username,
260 type: :string,
261 description: "SMTP AUTH username",
262 suggestions: ["user@example.com"]
263 },
264 %{
265 group: {:subgroup, Swoosh.Adapters.SMTP},
266 key: :password,
267 type: :string,
268 description: "SMTP AUTH password",
269 suggestions: ["password"]
270 },
271 %{
272 group: {:subgroup, Swoosh.Adapters.SMTP},
273 key: :ssl,
274 label: "Use SSL",
275 type: :boolean,
276 description: "Use Implicit SSL/TLS. e.g. port 465"
277 },
278 %{
279 group: {:subgroup, Swoosh.Adapters.SMTP},
280 key: :tls,
281 label: "STARTTLS Mode",
282 type: {:dropdown, :atom},
283 description: "Explicit TLS (STARTTLS) enforcement mode",
284 suggestions: [:if_available, :always, :never]
285 },
286 %{
287 group: {:subgroup, Swoosh.Adapters.SMTP},
288 key: :auth,
289 label: "AUTH Mode",
290 type: {:dropdown, :atom},
291 description: "SMTP AUTH enforcement mode",
292 suggestions: [:if_available, :always, :never]
293 },
294 %{
295 group: {:subgroup, Swoosh.Adapters.SMTP},
296 key: :retries,
297 type: :integer,
298 description: "SMTP temporary (4xx) error retries",
299 suggestions: [1]
300 },
301 %{
302 group: {:subgroup, Swoosh.Adapters.Sendgrid},
303 key: :api_key,
304 label: "SendGrid API Key",
305 type: :string,
306 suggestions: ["YOUR_API_KEY"]
307 },
308 %{
309 group: {:subgroup, Swoosh.Adapters.Sendmail},
310 key: :cmd_path,
311 type: :string,
312 suggestions: ["/usr/bin/sendmail"]
313 },
314 %{
315 group: {:subgroup, Swoosh.Adapters.Sendmail},
316 key: :cmd_args,
317 type: :string,
318 suggestions: ["-N delay,failure,success"]
319 },
320 %{
321 group: {:subgroup, Swoosh.Adapters.Sendmail},
322 key: :qmail,
323 label: "Qmail compat mode",
324 type: :boolean
325 },
326 %{
327 group: {:subgroup, Swoosh.Adapters.Mandrill},
328 key: :api_key,
329 label: "Mandrill API Key",
330 type: :string,
331 suggestions: ["YOUR_API_KEY"]
332 },
333 %{
334 group: {:subgroup, Swoosh.Adapters.Mailgun},
335 key: :api_key,
336 label: "Mailgun API Key",
337 type: :string,
338 suggestions: ["YOUR_API_KEY"]
339 },
340 %{
341 group: {:subgroup, Swoosh.Adapters.Mailgun},
342 key: :domain,
343 type: :string,
344 suggestions: ["YOUR_DOMAIN_NAME"]
345 },
346 %{
347 group: {:subgroup, Swoosh.Adapters.Mailjet},
348 key: :api_key,
349 label: "MailJet Public API Key",
350 type: :string,
351 suggestions: ["MJ_APIKEY_PUBLIC"]
352 },
353 %{
354 group: {:subgroup, Swoosh.Adapters.Mailjet},
355 key: :secret,
356 label: "MailJet Private API Key",
357 type: :string,
358 suggestions: ["MJ_APIKEY_PRIVATE"]
359 },
360 %{
361 group: {:subgroup, Swoosh.Adapters.Postmark},
362 key: :api_key,
363 label: "Postmark API Key",
364 type: :string,
365 suggestions: ["X-Postmark-Server-Token"]
366 },
367 %{
368 group: {:subgroup, Swoosh.Adapters.SparkPost},
369 key: :api_key,
370 label: "SparkPost API key",
371 type: :string,
372 suggestions: ["YOUR_API_KEY"]
373 },
374 %{
375 group: {:subgroup, Swoosh.Adapters.SparkPost},
376 key: :endpoint,
377 type: :string,
378 suggestions: ["https://api.sparkpost.com/api/v1"]
379 },
380 %{
381 group: {:subgroup, Swoosh.Adapters.AmazonSES},
382 key: :access_key,
383 label: "AWS Access Key",
384 type: :string,
385 suggestions: ["AWS_ACCESS_KEY"]
386 },
387 %{
388 group: {:subgroup, Swoosh.Adapters.AmazonSES},
389 key: :secret,
390 label: "AWS Secret Key",
391 type: :string,
392 suggestions: ["AWS_SECRET_KEY"]
393 },
394 %{
395 group: {:subgroup, Swoosh.Adapters.AmazonSES},
396 key: :region,
397 label: "AWS Region",
398 type: :string,
399 suggestions: ["us-east-1", "us-east-2"]
400 },
401 %{
402 group: {:subgroup, Swoosh.Adapters.Dyn},
403 key: :api_key,
404 label: "Dyn API Key",
405 type: :string,
406 suggestions: ["apikey"]
407 },
408 %{
409 group: {:subgroup, Swoosh.Adapters.SocketLabs},
410 key: :api_key,
411 label: "SocketLabs API Key",
412 type: :string,
413 suggestions: ["INJECTION_API_KEY"]
414 },
415 %{
416 group: {:subgroup, Swoosh.Adapters.SocketLabs},
417 key: :server_id,
418 label: "Server ID",
419 type: :string,
420 suggestions: ["SERVER_ID"]
421 },
422 %{
423 group: {:subgroup, Swoosh.Adapters.Gmail},
424 key: :access_token,
425 label: "GMail API Access Token",
426 type: :string,
427 suggestions: ["GMAIL_API_ACCESS_TOKEN"]
428 }
429 ]
430 },
431 %{
432 group: :pleroma,
433 key: :uri_schemes,
434 label: "URI Schemes",
435 type: :group,
436 description: "URI schemes related settings",
437 children: [
438 %{
439 key: :valid_schemes,
440 type: {:list, :string},
441 description: "List of the scheme part that is considered valid to be an URL",
442 suggestions: [
443 "https",
444 "http",
445 "dat",
446 "dweb",
447 "gopher",
448 "hyper",
449 "ipfs",
450 "ipns",
451 "irc",
452 "ircs",
453 "magnet",
454 "mailto",
455 "mumble",
456 "ssb",
457 "xmpp"
458 ]
459 }
460 ]
461 },
462 %{
463 group: :pleroma,
464 key: :database,
465 type: :group,
466 description: "Database-related settings",
467 children: [
468 %{
469 key: :improved_hashtag_timeline,
470 type: :keyword,
471 description:
472 "If `true`, hashtags will be fetched from `hashtags` table for hashtags timeline. When `false`, object-embedded hashtags will be used (slower). Is auto-set to `true` (unless overridden) when HashtagsTableMigrator completes."
473 }
474 ]
475 },
476 %{
477 group: :pleroma,
478 key: :populate_hashtags_table,
479 type: :group,
480 description: "`populate_hashtags_table` background migration settings",
481 children: [
482 %{
483 key: :fault_rate_allowance,
484 type: :float,
485 description:
486 "Max accepted rate of objects that failed in the migration. Any value from 0.0 which tolerates no errors to 1.0 which will enable the feature even if hashtags transfer failed for all records.",
487 suggestions: [0.01]
488 },
489 %{
490 key: :sleep_interval_ms,
491 type: :integer,
492 description:
493 "Sleep interval between each chunk of processed records in order to decrease the load on the system (defaults to 0 and should be keep default on most instances)."
494 }
495 ]
496 },
497 %{
498 group: :pleroma,
499 key: :instance,
500 type: :group,
501 description: "Instance-related settings",
502 children: [
503 %{
504 key: :name,
505 type: :string,
506 description: "Name of the instance",
507 suggestions: [
508 "Pleroma"
509 ]
510 },
511 %{
512 key: :email,
513 label: "Admin Email Address",
514 type: :string,
515 description: "Email used to reach an Administrator/Moderator of the instance",
516 suggestions: [
517 "email@example.com"
518 ]
519 },
520 %{
521 key: :notify_email,
522 label: "Sender Email Address",
523 type: :string,
524 description: "Envelope FROM address for mail sent via Pleroma",
525 suggestions: [
526 "notify@example.com"
527 ]
528 },
529 %{
530 key: :description,
531 type: :string,
532 description:
533 "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
534 suggestions: [
535 "Very cool instance"
536 ]
537 },
538 %{
539 key: :limit,
540 type: :integer,
541 description: "Posts character limit (CW/Subject included in the counter)",
542 suggestions: [
543 5_000
544 ]
545 },
546 %{
547 key: :chat_limit,
548 type: :integer,
549 description: "Character limit of the instance chat messages",
550 suggestions: [
551 5_000
552 ]
553 },
554 %{
555 key: :remote_limit,
556 type: :integer,
557 description: "Hard character limit beyond which remote posts will be dropped",
558 suggestions: [
559 100_000
560 ]
561 },
562 %{
563 key: :upload_limit,
564 type: :integer,
565 description: "File size limit of uploads (except for avatar, background, banner)",
566 suggestions: [
567 16_000_000
568 ]
569 },
570 %{
571 key: :avatar_upload_limit,
572 type: :integer,
573 description: "File size limit of user's profile avatars",
574 suggestions: [
575 2_000_000
576 ]
577 },
578 %{
579 key: :background_upload_limit,
580 type: :integer,
581 description: "File size limit of user's profile backgrounds",
582 suggestions: [
583 4_000_000
584 ]
585 },
586 %{
587 key: :banner_upload_limit,
588 type: :integer,
589 description: "File size limit of user's profile banners",
590 suggestions: [
591 4_000_000
592 ]
593 },
594 %{
595 key: :poll_limits,
596 type: :map,
597 description: "A map with poll limits for local polls",
598 suggestions: [
599 %{
600 max_options: 20,
601 max_option_chars: 200,
602 min_expiration: 0,
603 max_expiration: 31_536_000
604 }
605 ],
606 children: [
607 %{
608 key: :max_options,
609 type: :integer,
610 description: "Maximum number of options",
611 suggestions: [20]
612 },
613 %{
614 key: :max_option_chars,
615 type: :integer,
616 description: "Maximum number of characters per option",
617 suggestions: [200]
618 },
619 %{
620 key: :min_expiration,
621 type: :integer,
622 description: "Minimum expiration time (in seconds)",
623 suggestions: [0]
624 },
625 %{
626 key: :max_expiration,
627 type: :integer,
628 description: "Maximum expiration time (in seconds)",
629 suggestions: [3600]
630 }
631 ]
632 },
633 %{
634 key: :registrations_open,
635 type: :boolean,
636 description:
637 "Enable registrations for anyone. Invitations require this setting to be disabled."
638 },
639 %{
640 key: :invites_enabled,
641 type: :boolean,
642 description:
643 "Enable user invitations for admins (depends on `registrations_open` being disabled)"
644 },
645 %{
646 key: :account_activation_required,
647 type: :boolean,
648 description: "Require users to confirm their emails before signing in"
649 },
650 %{
651 key: :account_approval_required,
652 type: :boolean,
653 description: "Require users to be manually approved by an admin before signing in"
654 },
655 %{
656 key: :federating,
657 type: :boolean,
658 description: "Enable federation with other instances"
659 },
660 %{
661 key: :federation_incoming_replies_max_depth,
662 label: "Fed. incoming replies max depth",
663 type: :integer,
664 description:
665 "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
666 " 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.",
667 suggestions: [
668 100
669 ]
670 },
671 %{
672 key: :federation_reachability_timeout_days,
673 label: "Fed. reachability timeout days",
674 type: :integer,
675 description:
676 "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
677 suggestions: [
678 7
679 ]
680 },
681 %{
682 key: :allow_relay,
683 type: :boolean,
684 description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance"
685 },
686 %{
687 key: :public,
688 type: :boolean,
689 description:
690 "Makes the client API in authenticated mode-only except for user-profiles." <>
691 " Useful for disabling the Local Timeline and The Whole Known Network. " <>
692 " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
693 },
694 %{
695 key: :quarantined_instances,
696 type: {:list, :string},
697 description:
698 "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
699 suggestions: [
700 "quarantined.com",
701 "*.quarantined.com"
702 ]
703 },
704 %{
705 key: :static_dir,
706 type: :string,
707 description: "Instance static directory",
708 suggestions: [
709 "instance/static/"
710 ]
711 },
712 %{
713 key: :allowed_post_formats,
714 type: {:list, :string},
715 description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
716 suggestions: [
717 "text/plain",
718 "text/html",
719 "text/markdown",
720 "text/bbcode"
721 ]
722 },
723 %{
724 key: :extended_nickname_format,
725 type: :boolean,
726 description:
727 "Enable to use extended local nicknames format (allows underscores/dashes)." <>
728 " This will break federation with older software for theses nicknames."
729 },
730 %{
731 key: :cleanup_attachments,
732 type: :boolean,
733 description: """
734 Enable to remove associated attachments when status is removed.
735 This will not affect duplicates and attachments without status.
736 Enabling this will increase load to database when deleting statuses on larger instances.
737 """
738 },
739 %{
740 key: :max_pinned_statuses,
741 type: :integer,
742 description: "The maximum number of pinned statuses. 0 will disable the feature.",
743 suggestions: [
744 0,
745 1,
746 3
747 ]
748 },
749 %{
750 key: :autofollowed_nicknames,
751 type: {:list, :string},
752 description:
753 "Set to nicknames of (local) users that every new user should automatically follow"
754 },
755 %{
756 key: :autofollowing_nicknames,
757 type: {:list, :string},
758 description:
759 "Set to nicknames of (local) users that automatically follows every newly registered user"
760 },
761 %{
762 key: :attachment_links,
763 type: :boolean,
764 description: "Enable to automatically add attachment link text to statuses"
765 },
766 %{
767 key: :max_report_comment_size,
768 type: :integer,
769 description: "The maximum size of the report comment. Default: 1000.",
770 suggestions: [
771 1_000
772 ]
773 },
774 %{
775 key: :safe_dm_mentions,
776 label: "Safe DM mentions",
777 type: :boolean,
778 description:
779 "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
780 " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
781 " Default: disabled"
782 },
783 %{
784 key: :healthcheck,
785 type: :boolean,
786 description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`"
787 },
788 %{
789 key: :remote_post_retention_days,
790 type: :integer,
791 description:
792 "The default amount of days to retain remote posts when pruning the database",
793 suggestions: [
794 90
795 ]
796 },
797 %{
798 key: :user_bio_length,
799 type: :integer,
800 description: "A user bio maximum length. Default: 5000.",
801 suggestions: [
802 5_000
803 ]
804 },
805 %{
806 key: :user_name_length,
807 type: :integer,
808 description: "A user name maximum length. Default: 100.",
809 suggestions: [
810 100
811 ]
812 },
813 %{
814 key: :skip_thread_containment,
815 type: :boolean,
816 description: "Skip filtering out broken threads. Default: enabled."
817 },
818 %{
819 key: :limit_to_local_content,
820 type: {:dropdown, :atom},
821 description:
822 "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
823 suggestions: [
824 :unauthenticated,
825 :all,
826 false
827 ]
828 },
829 %{
830 key: :max_account_fields,
831 type: :integer,
832 description: "The maximum number of custom fields in the user profile. Default: 10.",
833 suggestions: [
834 10
835 ]
836 },
837 %{
838 key: :max_remote_account_fields,
839 type: :integer,
840 description:
841 "The maximum number of custom fields in the remote user profile. Default: 20.",
842 suggestions: [
843 20
844 ]
845 },
846 %{
847 key: :account_field_name_length,
848 type: :integer,
849 description: "An account field name maximum length. Default: 512.",
850 suggestions: [
851 512
852 ]
853 },
854 %{
855 key: :account_field_value_length,
856 type: :integer,
857 description: "An account field value maximum length. Default: 2048.",
858 suggestions: [
859 2048
860 ]
861 },
862 %{
863 key: :registration_reason_length,
864 type: :integer,
865 description: "Maximum registration reason length. Default: 500.",
866 suggestions: [
867 500
868 ]
869 },
870 %{
871 key: :external_user_synchronization,
872 type: :boolean,
873 description: "Enabling following/followers counters synchronization for external users"
874 },
875 %{
876 key: :multi_factor_authentication,
877 type: :keyword,
878 description: "Multi-factor authentication settings",
879 suggestions: [
880 [
881 totp: [digits: 6, period: 30],
882 backup_codes: [number: 5, length: 16]
883 ]
884 ],
885 children: [
886 %{
887 key: :totp,
888 label: "TOTP settings",
889 type: :keyword,
890 description: "TOTP settings",
891 suggestions: [digits: 6, period: 30],
892 children: [
893 %{
894 key: :digits,
895 type: :integer,
896 suggestions: [6],
897 description:
898 "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
899 },
900 %{
901 key: :period,
902 type: :integer,
903 suggestions: [30],
904 description:
905 "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
906 }
907 ]
908 },
909 %{
910 key: :backup_codes,
911 type: :keyword,
912 description: "MFA backup codes settings",
913 suggestions: [number: 5, length: 16],
914 children: [
915 %{
916 key: :number,
917 type: :integer,
918 suggestions: [5],
919 description: "Number of backup codes to generate."
920 },
921 %{
922 key: :length,
923 type: :integer,
924 suggestions: [16],
925 description:
926 "Determines the length of backup one-time pass-codes, in characters. Defaults to 16 characters."
927 }
928 ]
929 }
930 ]
931 },
932 %{
933 key: :instance_thumbnail,
934 type: {:string, :image},
935 description:
936 "The instance thumbnail can be any image that represents your instance and is used by some apps or services when they display information about your instance.",
937 suggestions: ["/instance/thumbnail.jpeg"]
938 },
939 %{
940 key: :show_reactions,
941 type: :boolean,
942 description: "Let favourites and emoji reactions be viewed through the API."
943 }
944 ]
945 },
946 %{
947 group: :pleroma,
948 key: :welcome,
949 type: :group,
950 description: "Welcome messages settings",
951 children: [
952 %{
953 key: :direct_message,
954 type: :keyword,
955 descpiption: "Direct message settings",
956 children: [
957 %{
958 key: :enabled,
959 type: :boolean,
960 description: "Enables sending a direct message to newly registered users"
961 },
962 %{
963 key: :message,
964 type: :string,
965 description: "A message that will be sent to newly registered users",
966 suggestions: [
967 "Hi, @username! Welcome on board!"
968 ]
969 },
970 %{
971 key: :sender_nickname,
972 type: :string,
973 description: "The nickname of the local user that sends a welcome message",
974 suggestions: [
975 "lain"
976 ]
977 }
978 ]
979 },
980 %{
981 key: :chat_message,
982 type: :keyword,
983 descpiption: "Chat message settings",
984 children: [
985 %{
986 key: :enabled,
987 type: :boolean,
988 description: "Enables sending a chat message to newly registered users"
989 },
990 %{
991 key: :message,
992 type: :string,
993 description:
994 "A message that will be sent to newly registered users as a chat message",
995 suggestions: [
996 "Hello, welcome on board!"
997 ]
998 },
999 %{
1000 key: :sender_nickname,
1001 type: :string,
1002 description: "The nickname of the local user that sends a welcome chat message",
1003 suggestions: [
1004 "lain"
1005 ]
1006 }
1007 ]
1008 },
1009 %{
1010 key: :email,
1011 type: :keyword,
1012 descpiption: "Email message settings",
1013 children: [
1014 %{
1015 key: :enabled,
1016 type: :boolean,
1017 description: "Enables sending an email to newly registered users"
1018 },
1019 %{
1020 key: :sender,
1021 type: [:string, :tuple],
1022 description:
1023 "Email address and/or nickname that will be used to send the welcome email.",
1024 suggestions: [
1025 {"Pleroma App", "welcome@pleroma.app"}
1026 ]
1027 },
1028 %{
1029 key: :subject,
1030 type: :string,
1031 description:
1032 "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
1033 suggestions: ["Welcome to <%= instance_name%>"]
1034 },
1035 %{
1036 key: :html,
1037 type: :string,
1038 description:
1039 "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
1040 suggestions: ["<h1>Hello <%= user.name%>. Welcome to <%= instance_name%></h1>"]
1041 },
1042 %{
1043 key: :text,
1044 type: :string,
1045 description:
1046 "Text content of the welcome email. EEX template with user and instance_name variables can be used.",
1047 suggestions: ["Hello <%= user.name%>. \n Welcome to <%= instance_name%>\n"]
1048 }
1049 ]
1050 }
1051 ]
1052 },
1053 %{
1054 group: :logger,
1055 type: :group,
1056 description: "Logger-related settings",
1057 children: [
1058 %{
1059 key: :backends,
1060 type: [:atom, :tuple, :module],
1061 description:
1062 "Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
1063 suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]
1064 }
1065 ]
1066 },
1067 %{
1068 group: :logger,
1069 type: :group,
1070 key: :ex_syslogger,
1071 label: "ExSyslogger",
1072 description: "ExSyslogger-related settings",
1073 children: [
1074 %{
1075 key: :level,
1076 type: {:dropdown, :atom},
1077 description: "Log level",
1078 suggestions: [:debug, :info, :warn, :error]
1079 },
1080 %{
1081 key: :ident,
1082 type: :string,
1083 description:
1084 "A string that's prepended to every message, and is typically set to the app name",
1085 suggestions: ["pleroma"]
1086 },
1087 %{
1088 key: :format,
1089 type: :string,
1090 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1091 suggestions: ["$metadata[$level] $message"]
1092 },
1093 %{
1094 key: :metadata,
1095 type: {:list, :atom},
1096 suggestions: [:request_id]
1097 }
1098 ]
1099 },
1100 %{
1101 group: :logger,
1102 type: :group,
1103 key: :console,
1104 label: "Console Logger",
1105 description: "Console logger settings",
1106 children: [
1107 %{
1108 key: :level,
1109 type: {:dropdown, :atom},
1110 description: "Log level",
1111 suggestions: [:debug, :info, :warn, :error]
1112 },
1113 %{
1114 key: :format,
1115 type: :string,
1116 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1117 suggestions: ["$metadata[$level] $message"]
1118 },
1119 %{
1120 key: :metadata,
1121 type: {:list, :atom},
1122 suggestions: [:request_id]
1123 }
1124 ]
1125 },
1126 %{
1127 group: :quack,
1128 type: :group,
1129 label: "Quack Logger",
1130 description: "Quack-related settings",
1131 children: [
1132 %{
1133 key: :level,
1134 type: {:dropdown, :atom},
1135 description: "Log level",
1136 suggestions: [:debug, :info, :warn, :error]
1137 },
1138 %{
1139 key: :meta,
1140 type: {:list, :atom},
1141 description: "Configure which metadata you want to report on",
1142 suggestions: [
1143 :application,
1144 :module,
1145 :file,
1146 :function,
1147 :line,
1148 :pid,
1149 :crash_reason,
1150 :initial_call,
1151 :registered_name,
1152 :all,
1153 :none
1154 ]
1155 },
1156 %{
1157 key: :webhook_url,
1158 label: "Webhook URL",
1159 type: :string,
1160 description: "Configure the Slack incoming webhook",
1161 suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
1162 }
1163 ]
1164 },
1165 %{
1166 group: :pleroma,
1167 key: :frontend_configurations,
1168 type: :group,
1169 description:
1170 "This form can be used to configure a keyword list that keeps the configuration data for any " <>
1171 "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <>
1172 "add your own configuration your settings all fields must be complete.",
1173 children: [
1174 %{
1175 key: :pleroma_fe,
1176 label: "Pleroma FE",
1177 type: :map,
1178 description: "Settings for Pleroma FE",
1179 suggestions: [
1180 %{
1181 alwaysShowSubjectInput: true,
1182 background: "/static/aurora_borealis.jpg",
1183 collapseMessageWithSubject: false,
1184 disableChat: false,
1185 greentext: false,
1186 hideFilteredStatuses: false,
1187 hideMutedPosts: false,
1188 hidePostStats: false,
1189 hideSitename: false,
1190 hideUserStats: false,
1191 loginMethod: "password",
1192 logo: "/static/logo.svg",
1193 logoMargin: ".1em",
1194 logoMask: true,
1195 minimalScopesMode: false,
1196 noAttachmentLinks: false,
1197 nsfwCensorImage: "/static/img/nsfw.74818f9.png",
1198 postContentType: "text/plain",
1199 redirectRootLogin: "/main/friends",
1200 redirectRootNoLogin: "/main/all",
1201 scopeCopy: true,
1202 sidebarRight: false,
1203 showFeaturesPanel: true,
1204 showInstanceSpecificPanel: false,
1205 subjectLineBehavior: "email",
1206 theme: "pleroma-dark",
1207 webPushNotifications: false
1208 }
1209 ],
1210 children: [
1211 %{
1212 key: :alwaysShowSubjectInput,
1213 label: "Always show subject input",
1214 type: :boolean,
1215 description: "When disabled, auto-hide the subject field if it's empty"
1216 },
1217 %{
1218 key: :background,
1219 type: {:string, :image},
1220 description:
1221 "URL of the background, unless viewing a user profile with a background that is set",
1222 suggestions: ["/images/city.jpg"]
1223 },
1224 %{
1225 key: :collapseMessageWithSubject,
1226 label: "Collapse message with subject",
1227 type: :boolean,
1228 description:
1229 "When a message has a subject (aka Content Warning), collapse it by default"
1230 },
1231 %{
1232 key: :disableChat,
1233 label: "PleromaFE Chat",
1234 type: :boolean,
1235 description: "Disables PleromaFE Chat component"
1236 },
1237 %{
1238 key: :greentext,
1239 label: "Greentext",
1240 type: :boolean,
1241 description: "Enables green text on lines prefixed with the > character"
1242 },
1243 %{
1244 key: :hideFilteredStatuses,
1245 label: "Hide Filtered Statuses",
1246 type: :boolean,
1247 description: "Hides filtered statuses from timelines"
1248 },
1249 %{
1250 key: :hideMutedPosts,
1251 label: "Hide Muted Posts",
1252 type: :boolean,
1253 description: "Hides muted statuses from timelines"
1254 },
1255 %{
1256 key: :hidePostStats,
1257 label: "Hide post stats",
1258 type: :boolean,
1259 description: "Hide notices statistics (repeats, favorites, ...)"
1260 },
1261 %{
1262 key: :hideSitename,
1263 label: "Hide Sitename",
1264 type: :boolean,
1265 description: "Hides instance name from PleromaFE banner"
1266 },
1267 %{
1268 key: :hideUserStats,
1269 label: "Hide user stats",
1270 type: :boolean,
1271 description:
1272 "Hide profile statistics (posts, posts per day, followers, followings, ...)"
1273 },
1274 %{
1275 key: :logo,
1276 type: {:string, :image},
1277 description: "URL of the logo, defaults to Pleroma's logo",
1278 suggestions: ["/static/logo.svg"]
1279 },
1280 %{
1281 key: :logoMargin,
1282 label: "Logo margin",
1283 type: :string,
1284 description:
1285 "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
1286 "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
1287 suggestions: [".1em"]
1288 },
1289 %{
1290 key: :logoMask,
1291 label: "Logo mask",
1292 type: :boolean,
1293 description:
1294 "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <>
1295 "If you want a colorful logo you must disable logoMask."
1296 },
1297 %{
1298 key: :minimalScopesMode,
1299 label: "Minimal scopes mode",
1300 type: :boolean,
1301 description:
1302 "Limit scope selection to Direct, User default, and Scope of post replying to. " <>
1303 "Also prevents replying to a DM with a public post from PleromaFE."
1304 },
1305 %{
1306 key: :nsfwCensorImage,
1307 label: "NSFW Censor Image",
1308 type: {:string, :image},
1309 description:
1310 "URL of the image to use for hiding NSFW media attachments in the timeline",
1311 suggestions: ["/static/img/nsfw.74818f9.png"]
1312 },
1313 %{
1314 key: :postContentType,
1315 label: "Post Content Type",
1316 type: {:dropdown, :atom},
1317 description: "Default post formatting option",
1318 suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"]
1319 },
1320 %{
1321 key: :redirectRootNoLogin,
1322 label: "Redirect root no login",
1323 type: :string,
1324 description:
1325 "Relative URL which indicates where to redirect when a user isn't logged in",
1326 suggestions: ["/main/all"]
1327 },
1328 %{
1329 key: :redirectRootLogin,
1330 label: "Redirect root login",
1331 type: :string,
1332 description:
1333 "Relative URL which indicates where to redirect when a user is logged in",
1334 suggestions: ["/main/friends"]
1335 },
1336 %{
1337 key: :scopeCopy,
1338 label: "Scope copy",
1339 type: :boolean,
1340 description: "Copy the scope (private/unlisted/public) in replies to posts by default"
1341 },
1342 %{
1343 key: :sidebarRight,
1344 label: "Sidebar on Right",
1345 type: :boolean,
1346 description: "Change alignment of sidebar and panels to the right"
1347 },
1348 %{
1349 key: :showFeaturesPanel,
1350 label: "Show instance features panel",
1351 type: :boolean,
1352 description:
1353 "Enables panel displaying functionality of the instance on the About page"
1354 },
1355 %{
1356 key: :showInstanceSpecificPanel,
1357 label: "Show instance specific panel",
1358 type: :boolean,
1359 description: "Whether to show the instance's custom panel"
1360 },
1361 %{
1362 key: :subjectLineBehavior,
1363 label: "Subject line behavior",
1364 type: :string,
1365 description: "Allows changing the default behaviour of subject lines in replies.
1366 `email`: copy and preprend re:, as in email,
1367 `masto`: copy verbatim, as in Mastodon,
1368 `noop`: don't copy the subject.",
1369 suggestions: ["email", "masto", "noop"]
1370 },
1371 %{
1372 key: :theme,
1373 type: :string,
1374 description: "Which theme to use. Available themes are defined in styles.json",
1375 suggestions: ["pleroma-dark"]
1376 }
1377 ]
1378 },
1379 %{
1380 key: :masto_fe,
1381 label: "Masto FE",
1382 type: :map,
1383 description: "Settings for Masto FE",
1384 suggestions: [
1385 %{
1386 showInstanceSpecificPanel: true
1387 }
1388 ],
1389 children: [
1390 %{
1391 key: :showInstanceSpecificPanel,
1392 label: "Show instance specific panel",
1393 type: :boolean,
1394 description: "Whenether to show the instance's specific panel"
1395 }
1396 ]
1397 }
1398 ]
1399 },
1400 %{
1401 group: :pleroma,
1402 key: :assets,
1403 type: :group,
1404 description:
1405 "This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
1406 children: [
1407 %{
1408 key: :mascots,
1409 type: {:keyword, :map},
1410 description:
1411 "Keyword of mascots, each element must contain both an URL and a mime_type key",
1412 suggestions: [
1413 pleroma_fox_tan: %{
1414 url: "/images/pleroma-fox-tan-smol.png",
1415 mime_type: "image/png"
1416 },
1417 pleroma_fox_tan_shy: %{
1418 url: "/images/pleroma-fox-tan-shy.png",
1419 mime_type: "image/png"
1420 }
1421 ]
1422 },
1423 %{
1424 key: :default_mascot,
1425 type: :atom,
1426 description:
1427 "This will be used as the default mascot on MastoFE. Default: `:pleroma_fox_tan`",
1428 suggestions: [
1429 :pleroma_fox_tan
1430 ]
1431 },
1432 %{
1433 key: :default_user_avatar,
1434 type: {:string, :image},
1435 description: "URL of the default user avatar",
1436 suggestions: ["/images/avi.png"]
1437 }
1438 ]
1439 },
1440 %{
1441 group: :pleroma,
1442 key: :manifest,
1443 type: :group,
1444 description:
1445 "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.",
1446 children: [
1447 %{
1448 key: :icons,
1449 type: {:list, :map},
1450 description: "Describe the icons of the app",
1451 suggestion: [
1452 %{
1453 src: "/static/logo.png"
1454 },
1455 %{
1456 src: "/static/icon.png",
1457 type: "image/png"
1458 },
1459 %{
1460 src: "/static/icon.ico",
1461 sizes: "72x72 96x96 128x128 256x256"
1462 }
1463 ]
1464 },
1465 %{
1466 key: :theme_color,
1467 type: :string,
1468 description: "Describe the theme color of the app",
1469 suggestions: ["#282c37", "mediumpurple"]
1470 },
1471 %{
1472 key: :background_color,
1473 type: :string,
1474 description: "Describe the background color of the app",
1475 suggestions: ["#191b22", "aliceblue"]
1476 }
1477 ]
1478 },
1479 %{
1480 group: :pleroma,
1481 key: :media_proxy,
1482 type: :group,
1483 description: "Media proxy",
1484 children: [
1485 %{
1486 key: :enabled,
1487 type: :boolean,
1488 description: "Enables proxying of remote media via the instance's proxy"
1489 },
1490 %{
1491 key: :base_url,
1492 label: "Base URL",
1493 type: :string,
1494 description:
1495 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1496 suggestions: ["https://example.com"]
1497 },
1498 %{
1499 key: :invalidation,
1500 type: :keyword,
1501 descpiption: "",
1502 suggestions: [
1503 enabled: true,
1504 provider: Pleroma.Web.MediaProxy.Invalidation.Script
1505 ],
1506 children: [
1507 %{
1508 key: :enabled,
1509 type: :boolean,
1510 description: "Enables media cache object invalidation."
1511 },
1512 %{
1513 key: :provider,
1514 type: :module,
1515 description: "Module which will be used to purge objects from the cache.",
1516 suggestions: [
1517 Pleroma.Web.MediaProxy.Invalidation.Script,
1518 Pleroma.Web.MediaProxy.Invalidation.Http
1519 ]
1520 }
1521 ]
1522 },
1523 %{
1524 key: :proxy_opts,
1525 label: "Advanced MediaProxy Options",
1526 type: :keyword,
1527 description: "Internal Pleroma.ReverseProxy settings",
1528 suggestions: [
1529 redirect_on_failure: false,
1530 max_body_length: 25 * 1_048_576,
1531 max_read_duration: 30_000
1532 ],
1533 children: [
1534 %{
1535 key: :redirect_on_failure,
1536 type: :boolean,
1537 description: """
1538 Redirects the client to the origin server upon encountering HTTP errors.\n
1539 Note that files larger than Max Body Length will trigger an error. (e.g., Peertube videos)\n\n
1540 **WARNING:** This setting will allow larger files to be accessed, but exposes the\n
1541 IP addresses of your users to the other servers, bypassing the MediaProxy.
1542 """
1543 },
1544 %{
1545 key: :max_body_length,
1546 type: :integer,
1547 description:
1548 "Maximum file size (in bytes) allowed through the Pleroma MediaProxy cache."
1549 },
1550 %{
1551 key: :max_read_duration,
1552 type: :integer,
1553 description: "Timeout (in milliseconds) of GET request to the remote URI."
1554 }
1555 ]
1556 },
1557 %{
1558 key: :whitelist,
1559 type: {:list, :string},
1560 description: "List of hosts with scheme to bypass the MediaProxy",
1561 suggestions: ["http://example.com"]
1562 }
1563 ]
1564 },
1565 %{
1566 group: :pleroma,
1567 key: :media_preview_proxy,
1568 type: :group,
1569 description: "Media preview proxy",
1570 children: [
1571 %{
1572 key: :enabled,
1573 type: :boolean,
1574 description:
1575 "Enables proxying of remote media preview to the instance's proxy. Requires enabled media proxy."
1576 },
1577 %{
1578 key: :thumbnail_max_width,
1579 type: :integer,
1580 description:
1581 "Max width of preview thumbnail for images (video preview always has original dimensions)."
1582 },
1583 %{
1584 key: :thumbnail_max_height,
1585 type: :integer,
1586 description:
1587 "Max height of preview thumbnail for images (video preview always has original dimensions)."
1588 },
1589 %{
1590 key: :image_quality,
1591 type: :integer,
1592 description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)."
1593 },
1594 %{
1595 key: :min_content_length,
1596 type: :integer,
1597 description:
1598 "Min content length (in bytes) to perform preview. Media smaller in size will be served without thumbnailing."
1599 }
1600 ]
1601 },
1602 %{
1603 group: :pleroma,
1604 key: Pleroma.Web.MediaProxy.Invalidation.Http,
1605 type: :group,
1606 description: "HTTP invalidate settings",
1607 children: [
1608 %{
1609 key: :method,
1610 type: :atom,
1611 description: "HTTP method of request. Default: :purge"
1612 },
1613 %{
1614 key: :headers,
1615 type: {:keyword, :string},
1616 description: "HTTP headers of request",
1617 suggestions: [{"x-refresh", 1}]
1618 },
1619 %{
1620 key: :options,
1621 type: :keyword,
1622 description: "Request options",
1623 children: [
1624 %{
1625 key: :params,
1626 type: {:map, :string}
1627 }
1628 ]
1629 }
1630 ]
1631 },
1632 %{
1633 group: :pleroma,
1634 key: Pleroma.Web.MediaProxy.Invalidation.Script,
1635 type: :group,
1636 description: "Invalidation script settings",
1637 children: [
1638 %{
1639 key: :script_path,
1640 type: :string,
1641 description: "Path to executable script which will purge cached items.",
1642 suggestions: ["./installation/nginx-cache-purge.sh.example"]
1643 },
1644 %{
1645 key: :url_format,
1646 label: "URL Format",
1647 type: :string,
1648 description:
1649 "Optional URL format preprocessing. Only required for Apache's htcacheclean.",
1650 suggestions: [":htcacheclean"]
1651 }
1652 ]
1653 },
1654 %{
1655 group: :pleroma,
1656 key: :gopher,
1657 type: :group,
1658 description: "Gopher settings",
1659 children: [
1660 %{
1661 key: :enabled,
1662 type: :boolean,
1663 description: "Enables the gopher interface"
1664 },
1665 %{
1666 key: :ip,
1667 label: "IP",
1668 type: :tuple,
1669 description: "IP address to bind to",
1670 suggestions: [{0, 0, 0, 0}]
1671 },
1672 %{
1673 key: :port,
1674 type: :integer,
1675 description: "Port to bind to",
1676 suggestions: [9999]
1677 },
1678 %{
1679 key: :dstport,
1680 type: :integer,
1681 description: "Port advertised in URLs (optional, defaults to port)",
1682 suggestions: [9999]
1683 }
1684 ]
1685 },
1686 %{
1687 group: :pleroma,
1688 key: :activitypub,
1689 label: "ActivityPub",
1690 type: :group,
1691 description: "ActivityPub-related settings",
1692 children: [
1693 %{
1694 key: :unfollow_blocked,
1695 type: :boolean,
1696 description: "Whether blocks result in people getting unfollowed"
1697 },
1698 %{
1699 key: :outgoing_blocks,
1700 type: :boolean,
1701 description: "Whether to federate blocks to other instances"
1702 },
1703 %{
1704 key: :sign_object_fetches,
1705 type: :boolean,
1706 description: "Sign object fetches with HTTP signatures"
1707 },
1708 %{
1709 key: :note_replies_output_limit,
1710 type: :integer,
1711 description:
1712 "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)"
1713 },
1714 %{
1715 key: :follow_handshake_timeout,
1716 type: :integer,
1717 description: "Following handshake timeout",
1718 suggestions: [500]
1719 }
1720 ]
1721 },
1722 %{
1723 group: :pleroma,
1724 key: :http_security,
1725 label: "HTTP security",
1726 type: :group,
1727 description: "HTTP security settings",
1728 children: [
1729 %{
1730 key: :enabled,
1731 type: :boolean,
1732 description: "Whether the managed content security policy is enabled"
1733 },
1734 %{
1735 key: :sts,
1736 label: "STS",
1737 type: :boolean,
1738 description: "Whether to additionally send a Strict-Transport-Security header"
1739 },
1740 %{
1741 key: :sts_max_age,
1742 label: "STS max age",
1743 type: :integer,
1744 description: "The maximum age for the Strict-Transport-Security header if sent",
1745 suggestions: [31_536_000]
1746 },
1747 %{
1748 key: :ct_max_age,
1749 label: "CT max age",
1750 type: :integer,
1751 description: "The maximum age for the Expect-CT header if sent",
1752 suggestions: [2_592_000]
1753 },
1754 %{
1755 key: :referrer_policy,
1756 type: :string,
1757 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1758 suggestions: ["same-origin", "no-referrer"]
1759 },
1760 %{
1761 key: :report_uri,
1762 label: "Report URI",
1763 type: :string,
1764 description: "Adds the specified URL to report-uri and report-to group in CSP header",
1765 suggestions: ["https://example.com/report-uri"]
1766 }
1767 ]
1768 },
1769 %{
1770 group: :web_push_encryption,
1771 key: :vapid_details,
1772 label: "Vapid Details",
1773 type: :group,
1774 description:
1775 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it.",
1776 children: [
1777 %{
1778 key: :subject,
1779 type: :string,
1780 description:
1781 "A mailto link for the administrative contact." <>
1782 " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
1783 suggestions: ["mailto:moderators@pleroma.com"]
1784 },
1785 %{
1786 key: :public_key,
1787 type: :string,
1788 description: "VAPID public key",
1789 suggestions: ["Public key"]
1790 },
1791 %{
1792 key: :private_key,
1793 type: :string,
1794 description: "VAPID private key",
1795 suggestions: ["Private key"]
1796 }
1797 ]
1798 },
1799 %{
1800 group: :pleroma,
1801 key: Pleroma.Captcha,
1802 type: :group,
1803 description: "Captcha-related settings",
1804 children: [
1805 %{
1806 key: :enabled,
1807 type: :boolean,
1808 description: "Whether the captcha should be shown on registration"
1809 },
1810 %{
1811 key: :method,
1812 type: :module,
1813 description: "The method/service to use for captcha",
1814 suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
1815 },
1816 %{
1817 key: :seconds_valid,
1818 type: :integer,
1819 description: "The time in seconds for which the captcha is valid",
1820 suggestions: [60]
1821 }
1822 ]
1823 },
1824 %{
1825 group: :pleroma,
1826 key: Pleroma.Captcha.Kocaptcha,
1827 type: :group,
1828 description:
1829 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1830 " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
1831 children: [
1832 %{
1833 key: :endpoint,
1834 type: :string,
1835 description: "The kocaptcha endpoint to use",
1836 suggestions: ["https://captcha.kotobank.ch"]
1837 }
1838 ]
1839 },
1840 %{
1841 group: :pleroma,
1842 label: "Pleroma Admin Token",
1843 type: :group,
1844 description:
1845 "Allows setting a token that can be used to authenticate requests with admin privileges without a normal user account token. Append the `admin_token` parameter to requests to utilize it. (Please reconsider using HTTP Basic Auth or OAuth-based authentication if possible)",
1846 children: [
1847 %{
1848 key: :admin_token,
1849 type: :string,
1850 description: "Admin token",
1851 suggestions: [
1852 "Please use a high entropy string or UUID"
1853 ]
1854 }
1855 ]
1856 },
1857 %{
1858 group: :pleroma,
1859 key: Oban,
1860 type: :group,
1861 description:
1862 "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
1863 children: [
1864 %{
1865 key: :log,
1866 type: {:dropdown, :atom},
1867 description: "Logs verbose mode",
1868 suggestions: [false, :error, :warn, :info, :debug]
1869 },
1870 %{
1871 key: :queues,
1872 type: {:keyword, :integer},
1873 description:
1874 "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
1875 suggestions: [
1876 activity_expiration: 10,
1877 attachments_cleanup: 5,
1878 background: 5,
1879 federator_incoming: 50,
1880 federator_outgoing: 50,
1881 mailer: 10,
1882 scheduled_activities: 10,
1883 transmogrifier: 20,
1884 web_push: 50
1885 ],
1886 children: [
1887 %{
1888 key: :activity_expiration,
1889 type: :integer,
1890 description: "Activity expiration queue",
1891 suggestions: [10]
1892 },
1893 %{
1894 key: :backup,
1895 type: :integer,
1896 description: "Backup queue",
1897 suggestions: [1]
1898 },
1899 %{
1900 key: :attachments_cleanup,
1901 type: :integer,
1902 description: "Attachment deletion queue",
1903 suggestions: [5]
1904 },
1905 %{
1906 key: :background,
1907 type: :integer,
1908 description: "Background queue",
1909 suggestions: [5]
1910 },
1911 %{
1912 key: :federator_incoming,
1913 type: :integer,
1914 description: "Incoming federation queue",
1915 suggestions: [50]
1916 },
1917 %{
1918 key: :federator_outgoing,
1919 type: :integer,
1920 description: "Outgoing federation queue",
1921 suggestions: [50]
1922 },
1923 %{
1924 key: :mailer,
1925 type: :integer,
1926 description: "Email sender queue, see Pleroma.Emails.Mailer",
1927 suggestions: [10]
1928 },
1929 %{
1930 key: :scheduled_activities,
1931 type: :integer,
1932 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
1933 suggestions: [10]
1934 },
1935 %{
1936 key: :transmogrifier,
1937 type: :integer,
1938 description: "Transmogrifier queue",
1939 suggestions: [20]
1940 },
1941 %{
1942 key: :web_push,
1943 type: :integer,
1944 description: "Web push notifications queue",
1945 suggestions: [50]
1946 }
1947 ]
1948 },
1949 %{
1950 key: :crontab,
1951 type: {:list, :tuple},
1952 description: "Settings for cron background jobs",
1953 suggestions: [
1954 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
1955 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
1956 ]
1957 }
1958 ]
1959 },
1960 %{
1961 group: :pleroma,
1962 key: :workers,
1963 type: :group,
1964 description: "Includes custom worker options not interpretable directly by `Oban`",
1965 children: [
1966 %{
1967 key: :retries,
1968 type: {:keyword, :integer},
1969 description: "Max retry attempts for failed jobs, per `Oban` queue",
1970 suggestions: [
1971 federator_incoming: 5,
1972 federator_outgoing: 5
1973 ]
1974 }
1975 ]
1976 },
1977 %{
1978 group: :pleroma,
1979 key: Pleroma.Web.Metadata,
1980 type: :group,
1981 description: "Metadata-related settings",
1982 children: [
1983 %{
1984 key: :providers,
1985 type: {:list, :module},
1986 description: "List of metadata providers to enable",
1987 suggestions: [
1988 Pleroma.Web.Metadata.Providers.OpenGraph,
1989 Pleroma.Web.Metadata.Providers.TwitterCard,
1990 Pleroma.Web.Metadata.Providers.RelMe,
1991 Pleroma.Web.Metadata.Providers.Feed
1992 ]
1993 },
1994 %{
1995 key: :unfurl_nsfw,
1996 label: "Unfurl NSFW",
1997 type: :boolean,
1998 description: "When enabled NSFW attachments will be shown in previews"
1999 }
2000 ]
2001 },
2002 %{
2003 group: :pleroma,
2004 key: :rich_media,
2005 type: :group,
2006 description:
2007 "If enabled the instance will parse metadata from attached links to generate link previews",
2008 children: [
2009 %{
2010 key: :enabled,
2011 type: :boolean,
2012 description: "Enables RichMedia parsing of URLs"
2013 },
2014 %{
2015 key: :ignore_hosts,
2016 type: {:list, :string},
2017 description: "List of hosts which will be ignored by the metadata parser",
2018 suggestions: ["accounts.google.com", "xss.website"]
2019 },
2020 %{
2021 key: :ignore_tld,
2022 label: "Ignore TLD",
2023 type: {:list, :string},
2024 description: "List TLDs (top-level domains) which will ignore for parse metadata",
2025 suggestions: ["local", "localdomain", "lan"]
2026 },
2027 %{
2028 key: :parsers,
2029 type: {:list, :module},
2030 description:
2031 "List of Rich Media parsers. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parsers.` part), but on adding custom module you need to use full name.",
2032 suggestions: [
2033 Pleroma.Web.RichMedia.Parsers.OEmbed,
2034 Pleroma.Web.RichMedia.Parsers.TwitterCard
2035 ]
2036 },
2037 %{
2038 key: :ttl_setters,
2039 label: "TTL setters",
2040 type: {:list, :module},
2041 description:
2042 "List of rich media TTL setters. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parser.` part), but on adding custom module you need to use full name.",
2043 suggestions: [
2044 Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2045 ]
2046 },
2047 %{
2048 key: :failure_backoff,
2049 type: :integer,
2050 description:
2051 "Amount of milliseconds after request failure, during which the request will not be retried.",
2052 suggestions: [60_000]
2053 }
2054 ]
2055 },
2056 %{
2057 group: :pleroma,
2058 key: Pleroma.Formatter,
2059 label: "Linkify",
2060 type: :group,
2061 description:
2062 "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.",
2063 children: [
2064 %{
2065 key: :class,
2066 type: [:string, :boolean],
2067 description: "Specify the class to be added to the generated link. Disable to clear.",
2068 suggestions: ["auto-linker", false]
2069 },
2070 %{
2071 key: :rel,
2072 type: [:string, :boolean],
2073 description: "Override the rel attribute. Disable to clear.",
2074 suggestions: ["ugc", "noopener noreferrer", false]
2075 },
2076 %{
2077 key: :new_window,
2078 type: :boolean,
2079 description: "Link URLs will open in a new window/tab."
2080 },
2081 %{
2082 key: :truncate,
2083 type: [:integer, :boolean],
2084 description:
2085 "Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...`",
2086 suggestions: [15, false]
2087 },
2088 %{
2089 key: :strip_prefix,
2090 type: :boolean,
2091 description: "Strip the scheme prefix."
2092 },
2093 %{
2094 key: :extra,
2095 type: :boolean,
2096 description: "Link URLs with rarely used schemes (magnet, ipfs, irc, etc.)"
2097 },
2098 %{
2099 key: :validate_tld,
2100 type: [:atom, :boolean],
2101 description:
2102 "Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for URLs without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't)",
2103 suggestions: [:no_scheme, true]
2104 }
2105 ]
2106 },
2107 %{
2108 group: :pleroma,
2109 key: Pleroma.ScheduledActivity,
2110 type: :group,
2111 description: "Scheduled activities settings",
2112 children: [
2113 %{
2114 key: :daily_user_limit,
2115 type: :integer,
2116 description:
2117 "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2118 suggestions: [25]
2119 },
2120 %{
2121 key: :total_user_limit,
2122 type: :integer,
2123 description:
2124 "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2125 suggestions: [300]
2126 },
2127 %{
2128 key: :enabled,
2129 type: :boolean,
2130 description: "Whether scheduled activities are sent to the job queue to be executed"
2131 }
2132 ]
2133 },
2134 %{
2135 group: :pleroma,
2136 key: Pleroma.Workers.PurgeExpiredActivity,
2137 type: :group,
2138 description: "Expired activities settings",
2139 children: [
2140 %{
2141 key: :enabled,
2142 type: :boolean,
2143 description: "Enables expired activities addition & deletion"
2144 },
2145 %{
2146 key: :min_lifetime,
2147 type: :integer,
2148 description: "Minimum lifetime for ephemeral activity (in seconds)",
2149 suggestions: [600]
2150 }
2151 ]
2152 },
2153 %{
2154 group: :pleroma,
2155 label: "Pleroma Authenticator",
2156 type: :group,
2157 description: "Authenticator",
2158 children: [
2159 %{
2160 key: Pleroma.Web.Auth.Authenticator,
2161 type: :module,
2162 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2163 }
2164 ]
2165 },
2166 %{
2167 group: :pleroma,
2168 key: :ldap,
2169 label: "LDAP",
2170 type: :group,
2171 description:
2172 "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2173 " will be verified by trying to authenticate (bind) to a LDAP server." <>
2174 " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2175 " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2176 children: [
2177 %{
2178 key: :enabled,
2179 type: :boolean,
2180 description: "Enables LDAP authentication"
2181 },
2182 %{
2183 key: :host,
2184 type: :string,
2185 description: "LDAP server hostname",
2186 suggestions: ["localhosts"]
2187 },
2188 %{
2189 key: :port,
2190 type: :integer,
2191 description: "LDAP port, e.g. 389 or 636",
2192 suggestions: [389, 636]
2193 },
2194 %{
2195 key: :ssl,
2196 label: "SSL",
2197 type: :boolean,
2198 description: "Enable to use SSL, usually implies the port 636"
2199 },
2200 %{
2201 key: :sslopts,
2202 label: "SSL options",
2203 type: :keyword,
2204 description: "Additional SSL options",
2205 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2206 children: [
2207 %{
2208 key: :cacertfile,
2209 type: :string,
2210 description: "Path to file with PEM encoded cacerts",
2211 suggestions: ["path/to/file/with/PEM/cacerts"]
2212 },
2213 %{
2214 key: :verify,
2215 type: :atom,
2216 description: "Type of cert verification",
2217 suggestions: [:verify_peer]
2218 }
2219 ]
2220 },
2221 %{
2222 key: :tls,
2223 label: "TLS",
2224 type: :boolean,
2225 description: "Enable to use STARTTLS, usually implies the port 389"
2226 },
2227 %{
2228 key: :tlsopts,
2229 label: "TLS options",
2230 type: :keyword,
2231 description: "Additional TLS options",
2232 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2233 children: [
2234 %{
2235 key: :cacertfile,
2236 type: :string,
2237 description: "Path to file with PEM encoded cacerts",
2238 suggestions: ["path/to/file/with/PEM/cacerts"]
2239 },
2240 %{
2241 key: :verify,
2242 type: :atom,
2243 description: "Type of cert verification",
2244 suggestions: [:verify_peer]
2245 }
2246 ]
2247 },
2248 %{
2249 key: :base,
2250 type: :string,
2251 description: "LDAP base, e.g. \"dc=example,dc=com\"",
2252 suggestions: ["dc=example,dc=com"]
2253 },
2254 %{
2255 key: :uid,
2256 label: "UID",
2257 type: :string,
2258 description:
2259 "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2260 suggestions: ["cn"]
2261 }
2262 ]
2263 },
2264 %{
2265 group: :pleroma,
2266 key: :auth,
2267 type: :group,
2268 description: "Authentication / authorization settings",
2269 children: [
2270 %{
2271 key: :enforce_oauth_admin_scope_usage,
2272 label: "Enforce OAuth admin scope usage",
2273 type: :boolean,
2274 description:
2275 "OAuth admin scope requirement toggle. " <>
2276 "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2277 "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
2278 "`is_admin` user flag grants access to admin-specific actions."
2279 },
2280 %{
2281 key: :auth_template,
2282 type: :string,
2283 description:
2284 "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2285 suggestions: ["show.html"]
2286 },
2287 %{
2288 key: :oauth_consumer_template,
2289 label: "OAuth consumer template",
2290 type: :string,
2291 description:
2292 "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2293 " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2294 suggestions: ["consumer.html"]
2295 },
2296 %{
2297 key: :oauth_consumer_strategies,
2298 label: "OAuth consumer strategies",
2299 type: {:list, :string},
2300 description:
2301 "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2302 " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2303 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2304 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2305 }
2306 ]
2307 },
2308 %{
2309 group: :pleroma,
2310 key: :email_notifications,
2311 type: :group,
2312 description: "Email notifications settings",
2313 children: [
2314 %{
2315 key: :digest,
2316 type: :map,
2317 description:
2318 "emails of \"what you've missed\" for users who have been inactive for a while",
2319 suggestions: [
2320 %{
2321 active: false,
2322 schedule: "0 0 * * 0",
2323 interval: 7,
2324 inactivity_threshold: 7
2325 }
2326 ],
2327 children: [
2328 %{
2329 key: :active,
2330 label: "Enabled",
2331 type: :boolean,
2332 description: "Globally enable or disable digest emails"
2333 },
2334 %{
2335 key: :schedule,
2336 type: :string,
2337 description:
2338 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2339 suggestions: ["0 0 * * 0"]
2340 },
2341 %{
2342 key: :interval,
2343 type: :integer,
2344 description: "Minimum interval between digest emails to one user",
2345 suggestions: [7]
2346 },
2347 %{
2348 key: :inactivity_threshold,
2349 type: :integer,
2350 description: "Minimum user inactivity threshold",
2351 suggestions: [7]
2352 }
2353 ]
2354 }
2355 ]
2356 },
2357 %{
2358 group: :pleroma,
2359 key: Pleroma.Emails.UserEmail,
2360 type: :group,
2361 description: "Email template settings",
2362 children: [
2363 %{
2364 key: :logo,
2365 type: {:string, :image},
2366 description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2367 suggestions: ["some/path/logo.png"]
2368 },
2369 %{
2370 key: :styling,
2371 type: :map,
2372 description: "A map with color settings for email templates.",
2373 suggestions: [
2374 %{
2375 link_color: "#d8a070",
2376 background_color: "#2C3645",
2377 content_background_color: "#1B2635",
2378 header_color: "#d8a070",
2379 text_color: "#b9b9ba",
2380 text_muted_color: "#b9b9ba"
2381 }
2382 ],
2383 children: [
2384 %{
2385 key: :link_color,
2386 type: :string,
2387 suggestions: ["#d8a070"]
2388 },
2389 %{
2390 key: :background_color,
2391 type: :string,
2392 suggestions: ["#2C3645"]
2393 },
2394 %{
2395 key: :content_background_color,
2396 type: :string,
2397 suggestions: ["#1B2635"]
2398 },
2399 %{
2400 key: :header_color,
2401 type: :string,
2402 suggestions: ["#d8a070"]
2403 },
2404 %{
2405 key: :text_color,
2406 type: :string,
2407 suggestions: ["#b9b9ba"]
2408 },
2409 %{
2410 key: :text_muted_color,
2411 type: :string,
2412 suggestions: ["#b9b9ba"]
2413 }
2414 ]
2415 }
2416 ]
2417 },
2418 %{
2419 group: :pleroma,
2420 key: Pleroma.Emails.NewUsersDigestEmail,
2421 type: :group,
2422 description: "New users admin email digest",
2423 children: [
2424 %{
2425 key: :enabled,
2426 type: :boolean,
2427 description: "Enables new users admin digest email when `true`"
2428 }
2429 ]
2430 },
2431 %{
2432 group: :pleroma,
2433 key: :oauth2,
2434 label: "OAuth2",
2435 type: :group,
2436 description: "Configure OAuth 2 provider capabilities",
2437 children: [
2438 %{
2439 key: :token_expires_in,
2440 type: :integer,
2441 description: "The lifetime in seconds of the access token",
2442 suggestions: [2_592_000]
2443 },
2444 %{
2445 key: :issue_new_refresh_token,
2446 type: :boolean,
2447 description:
2448 "Keeps old refresh token or generate new refresh token when to obtain an access token"
2449 },
2450 %{
2451 key: :clean_expired_tokens,
2452 type: :boolean,
2453 description: "Enable a background job to clean expired OAuth tokens. Default: disabled."
2454 }
2455 ]
2456 },
2457 %{
2458 group: :pleroma,
2459 key: :emoji,
2460 type: :group,
2461 children: [
2462 %{
2463 key: :shortcode_globs,
2464 type: {:list, :string},
2465 description: "Location of custom emoji files. * can be used as a wildcard.",
2466 suggestions: ["/emoji/custom/**/*.png"]
2467 },
2468 %{
2469 key: :pack_extensions,
2470 type: {:list, :string},
2471 description:
2472 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2473 suggestions: [".png", ".gif"]
2474 },
2475 %{
2476 key: :groups,
2477 type: {:keyword, {:list, :string}},
2478 description:
2479 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2480 " and the value is the location or array of locations. * can be used as a wildcard.",
2481 suggestions: [
2482 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2483 ]
2484 },
2485 %{
2486 key: :default_manifest,
2487 type: :string,
2488 description:
2489 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2490 " Currently only one manifest can be added (no arrays).",
2491 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2492 },
2493 %{
2494 key: :shared_pack_cache_seconds_per_file,
2495 label: "Shared pack cache s/file",
2496 type: :integer,
2497 descpiption:
2498 "When an emoji pack is shared, the archive is created and cached in memory" <>
2499 " for this amount of seconds multiplied by the number of files.",
2500 suggestions: [60]
2501 }
2502 ]
2503 },
2504 %{
2505 group: :pleroma,
2506 key: :rate_limit,
2507 type: :group,
2508 description:
2509 "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2510 children: [
2511 %{
2512 key: :search,
2513 type: [:tuple, {:list, :tuple}],
2514 description: "For the search requests (account & status search etc.)",
2515 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2516 },
2517 %{
2518 key: :timeline,
2519 type: [:tuple, {:list, :tuple}],
2520 description: "For requests to timelines (each timeline has it's own limiter)",
2521 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2522 },
2523 %{
2524 key: :app_account_creation,
2525 type: [:tuple, {:list, :tuple}],
2526 description: "For registering user accounts from the same IP address",
2527 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2528 },
2529 %{
2530 key: :relations_actions,
2531 type: [:tuple, {:list, :tuple}],
2532 description: "For actions on relationships with all users (follow, unfollow)",
2533 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2534 },
2535 %{
2536 key: :relation_id_action,
2537 label: "Relation ID action",
2538 type: [:tuple, {:list, :tuple}],
2539 description: "For actions on relation with a specific user (follow, unfollow)",
2540 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2541 },
2542 %{
2543 key: :statuses_actions,
2544 type: [:tuple, {:list, :tuple}],
2545 description:
2546 "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2547 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2548 },
2549 %{
2550 key: :status_id_action,
2551 label: "Status ID action",
2552 type: [:tuple, {:list, :tuple}],
2553 description:
2554 "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2555 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2556 },
2557 %{
2558 key: :authentication,
2559 type: [:tuple, {:list, :tuple}],
2560 description: "For authentication create / password check / user existence check requests",
2561 suggestions: [{60_000, 15}]
2562 }
2563 ]
2564 },
2565 %{
2566 group: :esshd,
2567 label: "ESSHD",
2568 type: :group,
2569 description:
2570 "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
2571 "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
2572 children: [
2573 %{
2574 key: :enabled,
2575 type: :boolean,
2576 description: "Enables SSH"
2577 },
2578 %{
2579 key: :priv_dir,
2580 type: :string,
2581 description: "Dir with SSH keys",
2582 suggestions: ["/some/path/ssh_keys"]
2583 },
2584 %{
2585 key: :handler,
2586 type: :string,
2587 description: "Handler module",
2588 suggestions: ["Pleroma.BBS.Handler"]
2589 },
2590 %{
2591 key: :port,
2592 type: :integer,
2593 description: "Port to connect",
2594 suggestions: [10_022]
2595 },
2596 %{
2597 key: :password_authenticator,
2598 type: :string,
2599 description: "Authenticator module",
2600 suggestions: ["Pleroma.BBS.Authenticator"]
2601 }
2602 ]
2603 },
2604 %{
2605 group: :mime,
2606 label: "Mime Types",
2607 type: :group,
2608 description: "Mime Types settings",
2609 children: [
2610 %{
2611 key: :types,
2612 type: :map,
2613 suggestions: [
2614 %{
2615 "application/xml" => ["xml"],
2616 "application/xrd+xml" => ["xrd+xml"],
2617 "application/jrd+json" => ["jrd+json"],
2618 "application/activity+json" => ["activity+json"],
2619 "application/ld+json" => ["activity+json"]
2620 }
2621 ],
2622 children: [
2623 %{
2624 key: "application/xml",
2625 type: {:list, :string},
2626 suggestions: ["xml"]
2627 },
2628 %{
2629 key: "application/xrd+xml",
2630 type: {:list, :string},
2631 suggestions: ["xrd+xml"]
2632 },
2633 %{
2634 key: "application/jrd+json",
2635 type: {:list, :string},
2636 suggestions: ["jrd+json"]
2637 },
2638 %{
2639 key: "application/activity+json",
2640 type: {:list, :string},
2641 suggestions: ["activity+json"]
2642 },
2643 %{
2644 key: "application/ld+json",
2645 type: {:list, :string},
2646 suggestions: ["activity+json"]
2647 }
2648 ]
2649 }
2650 ]
2651 },
2652 %{
2653 group: :pleroma,
2654 key: :chat,
2655 type: :group,
2656 description: "Pleroma chat settings",
2657 children: [
2658 %{
2659 key: :enabled,
2660 type: :boolean
2661 }
2662 ]
2663 },
2664 %{
2665 group: :pleroma,
2666 key: :http,
2667 label: "HTTP",
2668 type: :group,
2669 description: "HTTP settings",
2670 children: [
2671 %{
2672 key: :proxy_url,
2673 label: "Proxy URL",
2674 type: [:string, :tuple],
2675 description: "Proxy URL",
2676 suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
2677 },
2678 %{
2679 key: :send_user_agent,
2680 type: :boolean
2681 },
2682 %{
2683 key: :user_agent,
2684 type: [:string, :atom],
2685 description:
2686 "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
2687 suggestions: ["Pleroma", :default]
2688 },
2689 %{
2690 key: :adapter,
2691 type: :keyword,
2692 description: "Adapter specific options",
2693 suggestions: [],
2694 children: [
2695 %{
2696 key: :ssl_options,
2697 type: :keyword,
2698 label: "SSL Options",
2699 description: "SSL options for HTTP adapter",
2700 children: [
2701 %{
2702 key: :versions,
2703 type: {:list, :atom},
2704 description: "List of TLS version to use",
2705 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
2706 }
2707 ]
2708 }
2709 ]
2710 }
2711 ]
2712 },
2713 %{
2714 group: :pleroma,
2715 key: :markup,
2716 label: "Markup Settings",
2717 type: :group,
2718 children: [
2719 %{
2720 key: :allow_inline_images,
2721 type: :boolean
2722 },
2723 %{
2724 key: :allow_headings,
2725 type: :boolean
2726 },
2727 %{
2728 key: :allow_tables,
2729 type: :boolean
2730 },
2731 %{
2732 key: :allow_fonts,
2733 type: :boolean
2734 },
2735 %{
2736 key: :scrub_policy,
2737 type: {:list, :module},
2738 description:
2739 "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
2740 suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
2741 }
2742 ]
2743 },
2744 %{
2745 group: :pleroma,
2746 key: :user,
2747 type: :group,
2748 children: [
2749 %{
2750 key: :deny_follow_blocked,
2751 type: :boolean
2752 }
2753 ]
2754 },
2755 %{
2756 group: :pleroma,
2757 key: Pleroma.User,
2758 type: :group,
2759 children: [
2760 %{
2761 key: :restricted_nicknames,
2762 type: {:list, :string},
2763 description: "List of nicknames users may not register with.",
2764 suggestions: [
2765 ".well-known",
2766 "~",
2767 "about",
2768 "activities",
2769 "api",
2770 "auth",
2771 "check_password",
2772 "dev",
2773 "friend-requests",
2774 "inbox",
2775 "internal",
2776 "main",
2777 "media",
2778 "nodeinfo",
2779 "notice",
2780 "oauth",
2781 "objects",
2782 "ostatus_subscribe",
2783 "pleroma",
2784 "proxy",
2785 "push",
2786 "registration",
2787 "relay",
2788 "settings",
2789 "status",
2790 "tag",
2791 "user-search",
2792 "user_exists",
2793 "users",
2794 "web"
2795 ]
2796 },
2797 %{
2798 key: :email_blacklist,
2799 type: {:list, :string},
2800 description: "List of email domains users may not register with.",
2801 suggestions: ["mailinator.com", "maildrop.cc"]
2802 }
2803 ]
2804 },
2805 %{
2806 group: :cors_plug,
2807 label: "CORS plug config",
2808 type: :group,
2809 children: [
2810 %{
2811 key: :max_age,
2812 type: :integer,
2813 suggestions: [86_400]
2814 },
2815 %{
2816 key: :methods,
2817 type: {:list, :string},
2818 suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
2819 },
2820 %{
2821 key: :expose,
2822 type: {:list, :string},
2823 suggestions: [
2824 "Link",
2825 "X-RateLimit-Reset",
2826 "X-RateLimit-Limit",
2827 "X-RateLimit-Remaining",
2828 "X-Request-Id",
2829 "Idempotency-Key"
2830 ]
2831 },
2832 %{
2833 key: :credentials,
2834 type: :boolean
2835 },
2836 %{
2837 key: :headers,
2838 type: {:list, :string},
2839 suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
2840 }
2841 ]
2842 },
2843 %{
2844 group: :pleroma,
2845 key: Pleroma.Web.Plugs.RemoteIp,
2846 type: :group,
2847 description: """
2848 `Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
2849 **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
2850 """,
2851 children: [
2852 %{
2853 key: :enabled,
2854 type: :boolean,
2855 description: "Enable/disable the plug. Default: disabled."
2856 },
2857 %{
2858 key: :headers,
2859 type: {:list, :string},
2860 description: """
2861 A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
2862 """
2863 },
2864 %{
2865 key: :proxies,
2866 type: {:list, :string},
2867 description:
2868 "A list of upstream proxy IP subnets in CIDR notation from which we will parse the content of `headers`. Defaults to `[]`. IPv4 entries without a bitmask will be assumed to be /32 and IPv6 /128."
2869 },
2870 %{
2871 key: :reserved,
2872 type: {:list, :string},
2873 description: """
2874 A list of reserved IP subnets in CIDR notation which should be ignored if found in `headers`. Defaults to `["127.0.0.0/8", "::1/128", "fc00::/7", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]`
2875 """
2876 }
2877 ]
2878 },
2879 %{
2880 group: :pleroma,
2881 key: :web_cache_ttl,
2882 label: "Web cache TTL",
2883 type: :group,
2884 description:
2885 "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
2886 children: [
2887 %{
2888 key: :activity_pub,
2889 type: :integer,
2890 description:
2891 "Activity pub routes (except question activities). Default: `nil` (no expiration).",
2892 suggestions: [nil]
2893 },
2894 %{
2895 key: :activity_pub_question,
2896 type: :integer,
2897 description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
2898 suggestions: [30_000]
2899 }
2900 ]
2901 },
2902 %{
2903 group: :pleroma,
2904 key: :static_fe,
2905 label: "Static FE",
2906 type: :group,
2907 description:
2908 "Render profiles and posts using server-generated HTML that is viewable without using JavaScript",
2909 children: [
2910 %{
2911 key: :enabled,
2912 type: :boolean,
2913 description: "Enables the rendering of static HTML. Default: disabled."
2914 }
2915 ]
2916 },
2917 %{
2918 group: :pleroma,
2919 key: :feed,
2920 type: :group,
2921 description: "Configure feed rendering",
2922 children: [
2923 %{
2924 key: :post_title,
2925 type: :map,
2926 description: "Configure title rendering",
2927 children: [
2928 %{
2929 key: :max_length,
2930 type: :integer,
2931 description: "Maximum number of characters before truncating title",
2932 suggestions: [100]
2933 },
2934 %{
2935 key: :omission,
2936 type: :string,
2937 description: "Replacement which will be used after truncating string",
2938 suggestions: ["..."]
2939 }
2940 ]
2941 }
2942 ]
2943 },
2944 %{
2945 group: :pleroma,
2946 key: :modules,
2947 type: :group,
2948 description: "Custom Runtime Modules",
2949 children: [
2950 %{
2951 key: :runtime_dir,
2952 type: :string,
2953 description: "A path to custom Elixir modules (such as MRF policies)."
2954 }
2955 ]
2956 },
2957 %{
2958 group: :pleroma,
2959 key: :streamer,
2960 type: :group,
2961 description: "Settings for notifications streamer",
2962 children: [
2963 %{
2964 key: :workers,
2965 type: :integer,
2966 description: "Number of workers to send notifications",
2967 suggestions: [3]
2968 },
2969 %{
2970 key: :overflow_workers,
2971 type: :integer,
2972 description: "Maximum number of workers created if pool is empty",
2973 suggestions: [2]
2974 }
2975 ]
2976 },
2977 %{
2978 group: :pleroma,
2979 key: :connections_pool,
2980 type: :group,
2981 description: "Advanced settings for `Gun` connections pool",
2982 children: [
2983 %{
2984 key: :connection_acquisition_wait,
2985 type: :integer,
2986 description:
2987 "Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
2988 suggestions: [250]
2989 },
2990 %{
2991 key: :connection_acquisition_retries,
2992 type: :integer,
2993 description:
2994 "Number of attempts to acquire the connection from the pool if it is overloaded. Default: 5",
2995 suggestions: [5]
2996 },
2997 %{
2998 key: :max_connections,
2999 type: :integer,
3000 description: "Maximum number of connections in the pool. Default: 250 connections.",
3001 suggestions: [250]
3002 },
3003 %{
3004 key: :connect_timeout,
3005 type: :integer,
3006 description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
3007 suggestions: [5000]
3008 },
3009 %{
3010 key: :reclaim_multiplier,
3011 type: :integer,
3012 description:
3013 "Multiplier for the number of idle connection to be reclaimed if the pool is full. For example if the pool maxes out at 250 connections and this setting is set to 0.3, the pool will reclaim at most 75 idle connections if it's overloaded. Default: 0.1",
3014 suggestions: [0.1]
3015 }
3016 ]
3017 },
3018 %{
3019 group: :pleroma,
3020 key: :pools,
3021 type: :group,
3022 description: "Advanced settings for `Gun` workers pools",
3023 children:
3024 Enum.map([:federation, :media, :upload, :default], fn pool_name ->
3025 %{
3026 key: pool_name,
3027 type: :keyword,
3028 description: "Settings for #{pool_name} pool.",
3029 children: [
3030 %{
3031 key: :size,
3032 type: :integer,
3033 description: "Maximum number of concurrent requests in the pool.",
3034 suggestions: [50]
3035 },
3036 %{
3037 key: :max_waiting,
3038 type: :integer,
3039 description:
3040 "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made",
3041 suggestions: [10]
3042 },
3043 %{
3044 key: :recv_timeout,
3045 type: :integer,
3046 description: "Timeout for the pool while gun will wait for response",
3047 suggestions: [10_000]
3048 }
3049 ]
3050 }
3051 end)
3052 },
3053 %{
3054 group: :pleroma,
3055 key: :hackney_pools,
3056 type: :group,
3057 description: "Advanced settings for `Hackney` connections pools",
3058 children: [
3059 %{
3060 key: :federation,
3061 type: :keyword,
3062 description: "Settings for federation pool.",
3063 children: [
3064 %{
3065 key: :max_connections,
3066 type: :integer,
3067 description: "Number workers in the pool.",
3068 suggestions: [50]
3069 },
3070 %{
3071 key: :timeout,
3072 type: :integer,
3073 description: "Timeout while `hackney` will wait for response.",
3074 suggestions: [150_000]
3075 }
3076 ]
3077 },
3078 %{
3079 key: :media,
3080 type: :keyword,
3081 description: "Settings for media pool.",
3082 children: [
3083 %{
3084 key: :max_connections,
3085 type: :integer,
3086 description: "Number workers in the pool.",
3087 suggestions: [50]
3088 },
3089 %{
3090 key: :timeout,
3091 type: :integer,
3092 description: "Timeout while `hackney` will wait for response.",
3093 suggestions: [150_000]
3094 }
3095 ]
3096 },
3097 %{
3098 key: :upload,
3099 type: :keyword,
3100 description: "Settings for upload pool.",
3101 children: [
3102 %{
3103 key: :max_connections,
3104 type: :integer,
3105 description: "Number workers in the pool.",
3106 suggestions: [25]
3107 },
3108 %{
3109 key: :timeout,
3110 type: :integer,
3111 description: "Timeout while `hackney` will wait for response.",
3112 suggestions: [300_000]
3113 }
3114 ]
3115 }
3116 ]
3117 },
3118 %{
3119 group: :pleroma,
3120 key: :restrict_unauthenticated,
3121 label: "Restrict Unauthenticated",
3122 type: :group,
3123 description:
3124 "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
3125 children: [
3126 %{
3127 key: :timelines,
3128 type: :map,
3129 description: "Settings for public and federated timelines.",
3130 children: [
3131 %{
3132 key: :local,
3133 type: :boolean,
3134 description: "Disallow view public timeline."
3135 },
3136 %{
3137 key: :federated,
3138 type: :boolean,
3139 description: "Disallow view federated timeline."
3140 }
3141 ]
3142 },
3143 %{
3144 key: :profiles,
3145 type: :map,
3146 description: "Settings for user profiles.",
3147 children: [
3148 %{
3149 key: :local,
3150 type: :boolean,
3151 description: "Disallow view local user profiles."
3152 },
3153 %{
3154 key: :remote,
3155 type: :boolean,
3156 description: "Disallow view remote user profiles."
3157 }
3158 ]
3159 },
3160 %{
3161 key: :activities,
3162 type: :map,
3163 description: "Settings for statuses.",
3164 children: [
3165 %{
3166 key: :local,
3167 type: :boolean,
3168 description: "Disallow view local statuses."
3169 },
3170 %{
3171 key: :remote,
3172 type: :boolean,
3173 description: "Disallow view remote statuses."
3174 }
3175 ]
3176 }
3177 ]
3178 },
3179 %{
3180 group: :pleroma,
3181 key: Pleroma.Web.ApiSpec.CastAndValidate,
3182 type: :group,
3183 children: [
3184 %{
3185 key: :strict,
3186 type: :boolean,
3187 description:
3188 "Enables strict input validation (useful in development, not recommended in production)"
3189 }
3190 ]
3191 },
3192 %{
3193 group: :pleroma,
3194 key: :instances_favicons,
3195 type: :group,
3196 description: "Control favicons for instances",
3197 children: [
3198 %{
3199 key: :enabled,
3200 type: :boolean,
3201 description: "Allow/disallow displaying and getting instances favicons"
3202 }
3203 ]
3204 },
3205 %{
3206 group: :ex_aws,
3207 key: :s3,
3208 type: :group,
3209 descriptions: "S3 service related settings",
3210 children: [
3211 %{
3212 key: :access_key_id,
3213 type: :string,
3214 description: "S3 access key ID",
3215 suggestions: ["AKIAQ8UKHTGIYN7DMWWJ"]
3216 },
3217 %{
3218 key: :secret_access_key,
3219 type: :string,
3220 description: "Secret access key",
3221 suggestions: ["JFGt+fgH1UQ7vLUQjpW+WvjTdV/UNzVxcwn7DkaeFKtBS5LvoXvIiME4NQBsT6ZZ"]
3222 },
3223 %{
3224 key: :host,
3225 type: :string,
3226 description: "S3 host",
3227 suggestions: ["s3.eu-central-1.amazonaws.com"]
3228 },
3229 %{
3230 key: :region,
3231 type: :string,
3232 description: "S3 region (for AWS)",
3233 suggestions: ["us-east-1"]
3234 }
3235 ]
3236 },
3237 %{
3238 group: :pleroma,
3239 key: :frontends,
3240 type: :group,
3241 description: "Installed frontends management",
3242 children: [
3243 %{
3244 key: :primary,
3245 type: :map,
3246 description: "Primary frontend, the one that is served for all pages by default",
3247 children: installed_frontend_options
3248 },
3249 %{
3250 key: :admin,
3251 type: :map,
3252 description: "Admin frontend",
3253 children: installed_frontend_options
3254 },
3255 %{
3256 key: :available,
3257 type: :map,
3258 description:
3259 "A map containing available frontends and parameters for their installation.",
3260 children: frontend_options
3261 }
3262 ]
3263 },
3264 %{
3265 group: :pleroma,
3266 key: Pleroma.Web.Preload,
3267 type: :group,
3268 description: "Preload-related settings",
3269 children: [
3270 %{
3271 key: :providers,
3272 type: {:list, :module},
3273 description: "List of preload providers to enable",
3274 suggestions: [
3275 Pleroma.Web.Preload.Providers.Instance,
3276 Pleroma.Web.Preload.Providers.User,
3277 Pleroma.Web.Preload.Providers.Timelines,
3278 Pleroma.Web.Preload.Providers.StatusNet
3279 ]
3280 }
3281 ]
3282 },
3283 %{
3284 group: :pleroma,
3285 key: :majic_pool,
3286 type: :group,
3287 description: "Majic/libmagic configuration",
3288 children: [
3289 %{
3290 key: :size,
3291 type: :integer,
3292 description: "Number of majic workers to start.",
3293 suggestions: [2]
3294 }
3295 ]
3296 },
3297 %{
3298 group: :pleroma,
3299 key: Pleroma.User.Backup,
3300 type: :group,
3301 description: "Account Backup",
3302 children: [
3303 %{
3304 key: :purge_after_days,
3305 type: :integer,
3306 description: "Remove backup achives after N days",
3307 suggestions: [30]
3308 },
3309 %{
3310 key: :limit_days,
3311 type: :integer,
3312 description: "Limit user to export not more often than once per N days",
3313 suggestions: [7]
3314 }
3315 ]
3316 },
3317 %{
3318 group: :prometheus,
3319 key: Pleroma.Web.Endpoint.MetricsExporter,
3320 type: :group,
3321 description: "Prometheus app metrics endpoint configuration",
3322 children: [
3323 %{
3324 key: :enabled,
3325 type: :boolean,
3326 description: "[Pleroma extension] Enables app metrics endpoint."
3327 },
3328 %{
3329 key: :ip_whitelist,
3330 label: "IP Whitelist",
3331 type: [{:list, :string}, {:list, :charlist}, {:list, :tuple}],
3332 description: "Restrict access of app metrics endpoint to the specified IP addresses."
3333 },
3334 %{
3335 key: :auth,
3336 type: [:boolean, :tuple],
3337 description: "Enables HTTP Basic Auth for app metrics endpoint.",
3338 suggestion: [false, {:basic, "myusername", "mypassword"}]
3339 },
3340 %{
3341 key: :path,
3342 type: :string,
3343 description: "App metrics endpoint URI path.",
3344 suggestions: ["/api/pleroma/app_metrics"]
3345 },
3346 %{
3347 key: :format,
3348 type: :atom,
3349 description: "App metrics endpoint output format.",
3350 suggestions: [:text, :protobuf]
3351 }
3352 ]
3353 },
3354 %{
3355 group: :pleroma,
3356 key: ConcurrentLimiter,
3357 type: :group,
3358 description: "Limits configuration for background tasks.",
3359 children: [
3360 %{
3361 key: Pleroma.Web.RichMedia.Helpers,
3362 type: :keyword,
3363 description: "Concurrent limits configuration for getting RichMedia for activities.",
3364 suggestions: [max_running: 5, max_waiting: 5],
3365 children: [
3366 %{
3367 key: :max_running,
3368 type: :integer,
3369 description: "Max running concurrently jobs.",
3370 suggestion: [5]
3371 },
3372 %{
3373 key: :max_waiting,
3374 type: :integer,
3375 description: "Max waiting jobs.",
3376 suggestion: [5]
3377 }
3378 ]
3379 },
3380 %{
3381 key: Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy,
3382 type: :keyword,
3383 description: "Concurrent limits configuration for MediaProxyWarmingPolicy.",
3384 suggestions: [max_running: 5, max_waiting: 5],
3385 children: [
3386 %{
3387 key: :max_running,
3388 type: :integer,
3389 description: "Max running concurrently jobs.",
3390 suggestion: [5]
3391 },
3392 %{
3393 key: :max_waiting,
3394 type: :integer,
3395 description: "Max waiting jobs.",
3396 suggestion: [5]
3397 }
3398 ]
3399 }
3400 ]
3401 }
3402 ]