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."
+      },
+      %{
+        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: [
-          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},
-        description: "",
         suggestions: [[:request_id]]
       }
     ]
@@ -883,7 +886,6 @@ config :pleroma, :config_description, [
       %{
         key: :metadata,
         type: {:list, :atom},
-        description: "",
         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,
@@ -1177,7 +1218,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :mrf_rejectnonpublic,
     type: :group,
-    description: "",
     children: [
       %{
         key: :allow_followersonly,
@@ -1444,43 +1484,36 @@ config :pleroma, :config_description, [
       %{
         key: :instrumenters,
         type: {:list, :module},
-        description: "",
         suggestions: [Pleroma.Web.Endpoint.Instrumenter]
       },
       %{
         key: :protocol,
         type: :string,
-        description: "",
         suggestions: ["https"]
       },
       %{
         key: :secret_key_base,
         type: :string,
-        description: "",
         suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"]
       },
       %{
         key: :signing_salt,
         type: :string,
-        description: "",
         suggestions: ["CqaoopA2"]
       },
       %{
         key: :render_errors,
         type: :keyword,
-        description: "",
         suggestions: [[view: Pleroma.Web.ErrorView, accepts: ~w(json)]],
         children: [
           %{
             key: :view,
             type: :module,
-            description: "",
             suggestions: [Pleroma.Web.ErrorView]
           },
           %{
             key: :accepts,
             type: {:list, :string},
-            description: "",
             suggestions: ["json"]
           }
         ]
@@ -1488,32 +1521,27 @@ config :pleroma, :config_description, [
       %{
         key: :pubsub,
         type: :keyword,
-        description: "",
         suggestions: [[name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]],
         children: [
           %{
             key: :name,
             type: :module,
-            description: "",
             suggestions: [Pleroma.PubSub]
           },
           %{
             key: :adapter,
             type: :module,
-            description: "",
             suggestions: [Phoenix.PubSub.PG2]
           }
         ]
       },
       %{
         key: :secure_cookie_flag,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :extra_cookie_attrs,
         type: {:list, :string},
-        description: "",
         suggestions: ["SameSite=Lax"]
       }
     ]
@@ -1842,7 +1870,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :rich_media,
     type: :group,
-    description: "",
     children: [
       %{
         key: :enabled,
@@ -1916,7 +1943,7 @@ config :pleroma, :config_description, [
         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,
@@ -1995,7 +2022,6 @@ config :pleroma, :config_description, [
       %{
         key: Pleroma.Web.Auth.Authenticator,
         type: :module,
-        description: "",
         suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
       }
     ]
@@ -2150,7 +2176,7 @@ config :pleroma, :config_description, [
     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]
       },
@@ -2172,37 +2198,31 @@ config :pleroma, :config_description, [
           %{
             key: :link_color,
             type: :string,
-            description: "",
             suggestions: ["#d8a070"]
           },
           %{
             key: :background_color,
             type: :string,
-            description: "",
             suggestions: ["#2C3645"]
           },
           %{
             key: :content_background_color,
             type: :string,
-            description: "",
             suggestions: ["#1B2635"]
           },
           %{
             key: :header_color,
             type: :string,
-            description: "",
             suggestions: ["#d8a070"]
           },
           %{
             key: :text_color,
             type: :string,
-            description: "",
             suggestions: ["#b9b9ba"]
           },
           %{
             key: :text_muted_color,
             type: :string,
-            description: "",
             suggestions: ["#b9b9ba"]
           }
         ]
@@ -2245,7 +2265,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :emoji,
     type: :group,
-    description: "",
     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"]
+      },
+      %{
+        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,
-    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,
@@ -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}]]
+      },
+      %{
+        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,
-        description: "",
         suggestions: [
           %{
             "application/xml" => ["xml"],
@@ -2401,31 +2434,26 @@ config :pleroma, :config_description, [
           %{
             key: "application/xml",
             type: {:list, :string},
-            description: "",
             suggestions: [["xml"]]
           },
           %{
             key: "application/xrd+xml",
             type: {:list, :string},
-            description: "",
             suggestions: [["xrd+xml"]]
           },
           %{
             key: "application/jrd+json",
             type: {:list, :string},
-            description: "",
             suggestions: [["jrd+json"]]
           },
           %{
             key: "application/activity+json",
             type: {:list, :string},
-            description: "",
             suggestions: [["activity+json"]]
           },
           %{
             key: "application/ld+json",
             type: {:list, :string},
-            description: "",
             suggestions: [["activity+json"]]
           }
         ]
@@ -2453,8 +2481,7 @@ config :pleroma, :config_description, [
     children: [
       %{
         key: :enabled,
-        type: :boolean,
-        description: ""
+        type: :boolean
       }
     ]
   },
@@ -2462,7 +2489,6 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :suggestions,
     type: :group,
-    description: "",
     children: [
       %{
         key: :enabled,
@@ -2492,7 +2518,6 @@ config :pleroma, :config_description, [
       %{
         key: :web,
         type: :string,
-        description: "",
         suggestions: ["https://vinayaka.distsn.org"]
       }
     ]
@@ -2519,7 +2544,6 @@ config :pleroma, :config_description, [
       %{
         key: :adapter,
         type: :module,
-        description: "",
         suggestions: [Pleroma.Signature]
       }
     ]
@@ -2528,18 +2552,15 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: Pleroma.Uploaders.MDII,
     type: :group,
-    description: "",
     children: [
       %{
         key: :cgi,
         type: :string,
-        description: "",
         suggestions: ["https://mdii.sakura.ne.jp/mdii-post.cgi"]
       },
       %{
         key: :files,
         type: :string,
-        description: "",
         suggestions: ["https://mdii.sakura.ne.jp"]
       }
     ]
@@ -2553,18 +2574,15 @@ config :pleroma, :config_description, [
       %{
         key: :proxy_url,
         type: [:string, :atom, nil],
-        description: "",
         suggestions: ["localhost:9020", {:socks5, :localhost, 3090}, nil]
       },
       %{
         key: :send_user_agent,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :adapter,
         type: :keyword,
-        description: "",
         suggestions: [
           [
             ssl_options: [
@@ -2582,32 +2600,26 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :markup,
     type: :group,
-    description: "",
     children: [
       %{
         key: :allow_inline_images,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :allow_headings,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :allow_tables,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :allow_fonts,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :scrub_policy,
         type: {:list, :module},
-        description: "",
         suggestions: [[Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]]
       }
     ]
@@ -2616,12 +2628,10 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: :user,
     type: :group,
-    description: "",
     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,
-    description: "",
     children: [
       %{
         key: :scrub_policy,
         type: :module,
-        description: "",
         suggestions: [Pleroma.HTML.Scrubber.Default]
       }
     ]
@@ -2643,12 +2651,10 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: Pleroma.User,
     type: :group,
-    description: "",
     children: [
       %{
         key: :restricted_nicknames,
         type: {:list, :string},
-        description: "",
         suggestions: [
           [
             ".well-known",
@@ -2689,24 +2695,20 @@ config :pleroma, :config_description, [
   %{
     group: :cors_plug,
     type: :group,
-    description: "",
     children: [
       %{
         key: :max_age,
         type: :integer,
-        description: "",
         suggestions: [86_400]
       },
       %{
         key: :methods,
         type: {:list, :string},
-        description: "",
         suggestions: [["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]]
       },
       %{
         key: :expose,
         type: :string,
-        description: "",
         suggestions: [
           [
             "Link",
@@ -2720,17 +2722,51 @@ config :pleroma, :config_description, [
       },
       %{
         key: :credentials,
-        type: :boolean,
-        description: ""
+        type: :boolean
       },
       %{
         key: :headers,
         type: {:list, :string},
-        description: "",
         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,