Merge branch 'develop' into feature/store-statuses-data-inside-flag
[akkoma] / config / description.exs
index 959d839bc497849021b1029db756ae0f8c764e4a..70e963399c8de149ccba0ef97f294b02d4b45ac3 100644 (file)
@@ -110,6 +110,12 @@ config :pleroma, :config_description, [
         description:
           "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
             " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint."
         description:
           "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
             " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint."
+      },
+      %{
+        key: :streaming_enabled,
+        type: :boolean,
+        description:
+          "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."
       }
     ]
   },
       }
     ]
   },
@@ -575,9 +581,7 @@ config :pleroma, :config_description, [
         type: [:list, :module],
         description: "List of modules for federation publishing",
         suggestions: [
         type: [:list, :module],
         description: "List of modules for federation publishing",
         suggestions: [
-          Pleroma.Web.ActivityPub.Publisher,
-          Pleroma.Web.Websub,
-          Pleroma.Web.Salmo
+          Pleroma.Web.ActivityPub.Publisher
         ]
       },
       %{
         ]
       },
       %{
@@ -857,7 +861,6 @@ config :pleroma, :config_description, [
       %{
         key: :metadata,
         type: {:list, :atom},
       %{
         key: :metadata,
         type: {:list, :atom},
-        description: "",
         suggestions: [[:request_id]]
       }
     ]
         suggestions: [[:request_id]]
       }
     ]
@@ -883,7 +886,6 @@ config :pleroma, :config_description, [
       %{
         key: :metadata,
         type: {:list, :atom},
       %{
         key: :metadata,
         type: {:list, :atom},
-        description: "",
         suggestions: [[:request_id]]
       }
     ]
         suggestions: [[:request_id]]
       }
     ]
@@ -1096,6 +1098,45 @@ config :pleroma, :config_description, [
       }
     ]
   },
       }
     ]
   },
+  %{
+    group: :pleroma,
+    key: :manifest,
+    type: :group,
+    description:
+      "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE",
+    children: [
+      %{
+        key: :icons,
+        type: {:list, :map},
+        description: "Describe the icons of the app",
+        suggestion: [
+          %{
+            src: "/static/logo.png"
+          },
+          %{
+            src: "/static/icon.png",
+            type: "image/png"
+          },
+          %{
+            src: "/static/icon.ico",
+            sizes: "72x72 96x96 128x128 256x256"
+          }
+        ]
+      },
+      %{
+        key: :theme_color,
+        type: :string,
+        description: "Describe the theme color of the app",
+        suggestions: ["#282c37", "mediumpurple"]
+      },
+      %{
+        key: :background_color,
+        type: :string,
+        description: "Describe the background color of the app",
+        suggestions: ["#191b22", "aliceblue"]
+      }
+    ]
+  },
   %{
     group: :pleroma,
     key: :mrf_simple,
   %{
     group: :pleroma,
     key: :mrf_simple,
@@ -1177,7 +1218,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :mrf_rejectnonpublic,
     type: :group,
     group: :pleroma,
     key: :mrf_rejectnonpublic,
     type: :group,
-    description: "",
     children: [
       %{
         key: :allow_followersonly,
     children: [
       %{
         key: :allow_followersonly,
@@ -1444,43 +1484,36 @@ config :pleroma, :config_description, [
       %{
         key: :instrumenters,
         type: {:list, :module},
       %{
         key: :instrumenters,
         type: {:list, :module},
-        description: "",
         suggestions: [Pleroma.Web.Endpoint.Instrumenter]
       },
       %{
         key: :protocol,
         type: :string,
         suggestions: [Pleroma.Web.Endpoint.Instrumenter]
       },
       %{
         key: :protocol,
         type: :string,
-        description: "",
         suggestions: ["https"]
       },
       %{
         key: :secret_key_base,
         type: :string,
         suggestions: ["https"]
       },
       %{
         key: :secret_key_base,
         type: :string,
-        description: "",
         suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"]
       },
       %{
         key: :signing_salt,
         type: :string,
         suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"]
       },
       %{
         key: :signing_salt,
         type: :string,
-        description: "",
         suggestions: ["CqaoopA2"]
       },
       %{
         key: :render_errors,
         type: :keyword,
         suggestions: ["CqaoopA2"]
       },
       %{
         key: :render_errors,
         type: :keyword,
-        description: "",
         suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]],
         children: [
           %{
             key: :view,
             type: :module,
         suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]],
         children: [
           %{
             key: :view,
             type: :module,
-            description: "",
             suggestions: [Pleroma.Web.ErrorView]
           },
           %{
             key: :accepts,
             type: {:list, :string},
             suggestions: [Pleroma.Web.ErrorView]
           },
           %{
             key: :accepts,
             type: {:list, :string},
-            description: "",
             suggestions: ["json"]
           }
         ]
             suggestions: ["json"]
           }
         ]
@@ -1488,32 +1521,27 @@ config :pleroma, :config_description, [
       %{
         key: :pubsub,
         type: :keyword,
       %{
         key: :pubsub,
         type: :keyword,
-        description: "",
         suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]],
         children: [
           %{
             key: :name,
             type: :module,
         suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]],
         children: [
           %{
             key: :name,
             type: :module,
-            description: "",
             suggestions: [Pleroma.PubSub]
           },
           %{
             key: :adapter,
             type: :module,
             suggestions: [Pleroma.PubSub]
           },
           %{
             key: :adapter,
             type: :module,
-            description: "",
             suggestions: [Phoenix.PubSub.PG2]
           }
         ]
       },
       %{
         key: :secure_cookie_flag,
             suggestions: [Phoenix.PubSub.PG2]
           }
         ]
       },
       %{
         key: :secure_cookie_flag,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :extra_cookie_attrs,
         type: {:list, :string},
       },
       %{
         key: :extra_cookie_attrs,
         type: {:list, :string},
-        description: "",
         suggestions: ["SameSite=Lax"]
       }
     ]
         suggestions: ["SameSite=Lax"]
       }
     ]
@@ -1842,7 +1870,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :rich_media,
     type: :group,
     group: :pleroma,
     key: :rich_media,
     type: :group,
-    description: "",
     children: [
       %{
         key: :enabled,
     children: [
       %{
         key: :enabled,
@@ -1916,7 +1943,7 @@ config :pleroma, :config_description, [
         key: :rel,
         type: [:string, false],
         description: "override the rel attribute. false to clear",
         key: :rel,
         type: [:string, false],
         description: "override the rel attribute. false to clear",
-        suggestions: ["noopener noreferrer", false]
+        suggestions: ["ugc", "noopener noreferrer", false]
       },
       %{
         key: :new_window,
       },
       %{
         key: :new_window,
@@ -1995,7 +2022,6 @@ config :pleroma, :config_description, [
       %{
         key: Pleroma.Web.Auth.Authenticator,
         type: :module,
       %{
         key: Pleroma.Web.Auth.Authenticator,
         type: :module,
-        description: "",
         suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
       }
     ]
         suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
       }
     ]
@@ -2150,7 +2176,7 @@ config :pleroma, :config_description, [
     children: [
       %{
         key: :logo,
     children: [
       %{
         key: :logo,
-        type: [:string, nil],
+        type: [:string, nil],
         description: "a path to a custom logo. Set it to nil to use the default Pleroma logo",
         suggestions: ["some/path/logo.png", nil]
       },
         description: "a path to a custom logo. Set it to nil to use the default Pleroma logo",
         suggestions: ["some/path/logo.png", nil]
       },
@@ -2172,37 +2198,31 @@ config :pleroma, :config_description, [
           %{
             key: :link_color,
             type: :string,
           %{
             key: :link_color,
             type: :string,
-            description: "",
             suggestions: ["#d8a070"]
           },
           %{
             key: :background_color,
             type: :string,
             suggestions: ["#d8a070"]
           },
           %{
             key: :background_color,
             type: :string,
-            description: "",
             suggestions: ["#2C3645"]
           },
           %{
             key: :content_background_color,
             type: :string,
             suggestions: ["#2C3645"]
           },
           %{
             key: :content_background_color,
             type: :string,
-            description: "",
             suggestions: ["#1B2635"]
           },
           %{
             key: :header_color,
             type: :string,
             suggestions: ["#1B2635"]
           },
           %{
             key: :header_color,
             type: :string,
-            description: "",
             suggestions: ["#d8a070"]
           },
           %{
             key: :text_color,
             type: :string,
             suggestions: ["#d8a070"]
           },
           %{
             key: :text_color,
             type: :string,
-            description: "",
             suggestions: ["#b9b9ba"]
           },
           %{
             key: :text_muted_color,
             type: :string,
             suggestions: ["#b9b9ba"]
           },
           %{
             key: :text_muted_color,
             type: :string,
-            description: "",
             suggestions: ["#b9b9ba"]
           }
         ]
             suggestions: ["#b9b9ba"]
           }
         ]
@@ -2245,7 +2265,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :emoji,
     type: :group,
     group: :pleroma,
     key: :emoji,
     type: :group,
-    description: "",
     children: [
       %{
         key: :shortcode_globs,
     children: [
       %{
         key: :shortcode_globs,
@@ -2280,6 +2299,14 @@ config :pleroma, :config_description, [
           "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
             " Currently only one manifest can be added (no arrays)",
         suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
           "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
             " Currently only one manifest can be added (no arrays)",
         suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
+      },
+      %{
+        key: :shared_pack_cache_seconds_per_file,
+        type: :integer,
+        descpiption:
+          "When an emoji pack is shared, the archive is created and cached in memory" <>
+            " for this amount of seconds multiplied by the number of files.",
+        suggestions: [60]
       }
     ]
   },
       }
     ]
   },
@@ -2300,7 +2327,8 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :rate_limit,
     type: :group,
     group: :pleroma,
     key: :rate_limit,
     type: :group,
-    description: "Rate limit settings. This is an advanced feature and disabled by default.",
+    description:
+      "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
     children: [
       %{
         key: :search,
     children: [
       %{
         key: :search,
@@ -2339,6 +2367,12 @@ config :pleroma, :config_description, [
         description:
           "for fav / unfav or reblog / unreblog actions on the same status by the same user",
         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
         description:
           "for fav / unfav or reblog / unreblog actions on the same status by the same user",
         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
+      },
+      %{
+        key: :authentication,
+        type: [:tuple, {:list, :tuple}],
+        description: "for authentication create / password check / user existence check requests",
+        suggestions: [{60_000, 15}]
       }
     ]
   },
       }
     ]
   },
@@ -2387,7 +2421,6 @@ config :pleroma, :config_description, [
       %{
         key: :types,
         type: :map,
       %{
         key: :types,
         type: :map,
-        description: "",
         suggestions: [
           %{
             "application/xml" => ["xml"],
         suggestions: [
           %{
             "application/xml" => ["xml"],
@@ -2401,31 +2434,26 @@ config :pleroma, :config_description, [
           %{
             key: "application/xml",
             type: {:list, :string},
           %{
             key: "application/xml",
             type: {:list, :string},
-            description: "",
             suggestions: [["xml"]]
           },
           %{
             key: "application/xrd+xml",
             type: {:list, :string},
             suggestions: [["xml"]]
           },
           %{
             key: "application/xrd+xml",
             type: {:list, :string},
-            description: "",
             suggestions: [["xrd+xml"]]
           },
           %{
             key: "application/jrd+json",
             type: {:list, :string},
             suggestions: [["xrd+xml"]]
           },
           %{
             key: "application/jrd+json",
             type: {:list, :string},
-            description: "",
             suggestions: [["jrd+json"]]
           },
           %{
             key: "application/activity+json",
             type: {:list, :string},
             suggestions: [["jrd+json"]]
           },
           %{
             key: "application/activity+json",
             type: {:list, :string},
-            description: "",
             suggestions: [["activity+json"]]
           },
           %{
             key: "application/ld+json",
             type: {:list, :string},
             suggestions: [["activity+json"]]
           },
           %{
             key: "application/ld+json",
             type: {:list, :string},
-            description: "",
             suggestions: [["activity+json"]]
           }
         ]
             suggestions: [["activity+json"]]
           }
         ]
@@ -2453,8 +2481,7 @@ config :pleroma, :config_description, [
     children: [
       %{
         key: :enabled,
     children: [
       %{
         key: :enabled,
-        type: :boolean,
-        description: ""
+        type: :boolean
       }
     ]
   },
       }
     ]
   },
@@ -2462,7 +2489,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :suggestions,
     type: :group,
     group: :pleroma,
     key: :suggestions,
     type: :group,
-    description: "",
     children: [
       %{
         key: :enabled,
     children: [
       %{
         key: :enabled,
@@ -2492,7 +2518,6 @@ config :pleroma, :config_description, [
       %{
         key: :web,
         type: :string,
       %{
         key: :web,
         type: :string,
-        description: "",
         suggestions: ["https://vinayaka.distsn.org"]
       }
     ]
         suggestions: ["https://vinayaka.distsn.org"]
       }
     ]
@@ -2519,7 +2544,6 @@ config :pleroma, :config_description, [
       %{
         key: :adapter,
         type: :module,
       %{
         key: :adapter,
         type: :module,
-        description: "",
         suggestions: [Pleroma.Signature]
       }
     ]
         suggestions: [Pleroma.Signature]
       }
     ]
@@ -2528,18 +2552,15 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: Pleroma.Uploaders.MDII,
     type: :group,
     group: :pleroma,
     key: Pleroma.Uploaders.MDII,
     type: :group,
-    description: "",
     children: [
       %{
         key: :cgi,
         type: :string,
     children: [
       %{
         key: :cgi,
         type: :string,
-        description: "",
         suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"]
       },
       %{
         key: :files,
         type: :string,
         suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"]
       },
       %{
         key: :files,
         type: :string,
-        description: "",
         suggestions: ["https://mdii.sakura.ne.jp"]
       }
     ]
         suggestions: ["https://mdii.sakura.ne.jp"]
       }
     ]
@@ -2553,18 +2574,15 @@ config :pleroma, :config_description, [
       %{
         key: :proxy_url,
         type: [:string, :atom, nil],
       %{
         key: :proxy_url,
         type: [:string, :atom, nil],
-        description: "",
         suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil]
       },
       %{
         key: :send_user_agent,
         suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil]
       },
       %{
         key: :send_user_agent,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :adapter,
         type: :keyword,
       },
       %{
         key: :adapter,
         type: :keyword,
-        description: "",
         suggestions: [
           [
             ssl_options: [
         suggestions: [
           [
             ssl_options: [
@@ -2582,32 +2600,26 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :markup,
     type: :group,
     group: :pleroma,
     key: :markup,
     type: :group,
-    description: "",
     children: [
       %{
         key: :allow_inline_images,
     children: [
       %{
         key: :allow_inline_images,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :allow_headings,
       },
       %{
         key: :allow_headings,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :allow_tables,
       },
       %{
         key: :allow_tables,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :allow_fonts,
       },
       %{
         key: :allow_fonts,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :scrub_policy,
         type: {:list, :module},
       },
       %{
         key: :scrub_policy,
         type: {:list, :module},
-        description: "",
         suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]]
       }
     ]
         suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]]
       }
     ]
@@ -2616,12 +2628,10 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :user,
     type: :group,
     group: :pleroma,
     key: :user,
     type: :group,
-    description: "",
     children: [
       %{
         key: :deny_follow_blocked,
     children: [
       %{
         key: :deny_follow_blocked,
-        type: :boolean,
-        description: ""
+        type: :boolean
       }
     ]
   },
       }
     ]
   },
@@ -2629,12 +2639,10 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :mrf_normalize_markup,
     type: :group,
     group: :pleroma,
     key: :mrf_normalize_markup,
     type: :group,
-    description: "",
     children: [
       %{
         key: :scrub_policy,
         type: :module,
     children: [
       %{
         key: :scrub_policy,
         type: :module,
-        description: "",
         suggestions: [Pleroma.HTML.Scrubber.Default]
       }
     ]
         suggestions: [Pleroma.HTML.Scrubber.Default]
       }
     ]
@@ -2643,12 +2651,10 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: Pleroma.User,
     type: :group,
     group: :pleroma,
     key: Pleroma.User,
     type: :group,
-    description: "",
     children: [
       %{
         key: :restricted_nicknames,
         type: {:list, :string},
     children: [
       %{
         key: :restricted_nicknames,
         type: {:list, :string},
-        description: "",
         suggestions: [
           [
             ".well-known",
         suggestions: [
           [
             ".well-known",
@@ -2689,24 +2695,20 @@ config :pleroma, :config_description, [
   %{
     group: :cors_plug,
     type: :group,
   %{
     group: :cors_plug,
     type: :group,
-    description: "",
     children: [
       %{
         key: :max_age,
         type: :integer,
     children: [
       %{
         key: :max_age,
         type: :integer,
-        description: "",
         suggestions: [86_400]
       },
       %{
         key: :methods,
         type: {:list, :string},
         suggestions: [86_400]
       },
       %{
         key: :methods,
         type: {:list, :string},
-        description: "",
         suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]]
       },
       %{
         key: :expose,
         type: :string,
         suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]]
       },
       %{
         key: :expose,
         type: :string,
-        description: "",
         suggestions: [
           [
             "Link",
         suggestions: [
           [
             "Link",
@@ -2720,17 +2722,51 @@ config :pleroma, :config_description, [
       },
       %{
         key: :credentials,
       },
       %{
         key: :credentials,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :headers,
         type: {:list, :string},
       },
       %{
         key: :headers,
         type: {:list, :string},
-        description: "",
         suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]]
       }
     ]
   },
         suggestions: [["Authorization", "Content-Type", "Idempotency-Key"]]
       }
     ]
   },
+  %{
+    group: :pleroma,
+    key: Pleroma.Plugs.RemoteIp,
+    type: :group,
+    description: """
+    **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
+
+    `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
+    """,
+    children: [
+      %{
+        key: :enabled,
+        type: :boolean,
+        description: "Enable/disable the plug. Defaults to `false`.",
+        suggestions: [true, false]
+      },
+      %{
+        key: :headers,
+        type: {:list, :string},
+        description:
+          "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Defaults to `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`."
+      },
+      %{
+        key: :proxies,
+        type: {:list, :string},
+        description:
+          "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Defaults to `[]`."
+      },
+      %{
+        key: :reserved,
+        type: {:list, :string},
+        description:
+          "Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network)."
+      }
+    ]
+  },
   %{
     group: :pleroma,
     key: :web_cache_ttl,
   %{
     group: :pleroma,
     key: :web_cache_ttl,