X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=config%2Fdescription.exs;h=60f76be45ffb294b560af201556e0d67d643fc7e;hb=a136e7e9b590e3f23e472bf27c7c6a81d8d7792b;hp=c509109115b79564f6f1a057776d261d00014f1e;hpb=c1d51944c71ff90650b1a631241daf0d8be5b861;p=akkoma diff --git a/config/description.exs b/config/description.exs index c50910911..60f76be45 100644 --- a/config/description.exs +++ b/config/description.exs @@ -12,20 +12,35 @@ websocket_config = [ compress: false ] -frontend_options = [ +installed_frontend_options = [ %{ key: "name", label: "Name", type: :string, description: - "Name of the frontend. Valid config must include both `Name` and `Reference` values." + "Name of the installed frontend. Valid config must include both `Name` and `Reference` values." }, %{ key: "ref", label: "Reference", type: :string, description: - "Reference of the frontend to be used. Valid config must include both `Name` and `Reference` values." + "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values." + } +] + +frontend_options = [ + %{ + key: "name", + label: "Name", + type: :string, + description: "Name of the frontend." + }, + %{ + key: "ref", + label: "Reference", + type: :string, + description: "Reference of the frontend to be used." }, %{ key: "git", @@ -1865,6 +1880,7 @@ config :pleroma, :config_description, [ suggestions: [ redirect_on_failure: false, max_body_length: 25 * 1_048_576, + max_read_duration: 30_000, http: [ follow_redirect: true, pool: :media @@ -1885,6 +1901,11 @@ config :pleroma, :config_description, [ "Limits the content length to be approximately the " <> "specified length. It is validated with the `content-length` header and also verified when proxying." }, + %{ + key: :max_read_duration, + type: :integer, + description: "Timeout (in milliseconds) of GET request to remote URI." + }, %{ key: :http, label: "HTTP", @@ -1931,6 +1952,56 @@ config :pleroma, :config_description, [ } ] }, + %{ + group: :pleroma, + key: :media_preview_proxy, + type: :group, + description: "Media preview proxy", + children: [ + %{ + key: :enabled, + type: :boolean, + description: + "Enables proxying of remote media preview to the instance's proxy. Requires enabled media proxy." + }, + %{ + key: :thumbnail_max_width, + type: :integer, + description: "Max width of preview thumbnail." + }, + %{ + key: :thumbnail_max_height, + type: :integer, + description: "Max height of preview thumbnail." + }, + %{ + key: :image_quality, + type: :integer, + description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)." + }, + %{ + key: :proxy_opts, + type: :keyword, + description: "Media proxy options", + suggestions: [ + head_request_max_read_duration: 5_000 + ], + children: [ + %{ + key: :head_request_max_read_duration, + type: :integer, + description: "Timeout (in milliseconds) of HEAD request to remote URI." + } + ] + }, + %{ + key: :whitelist, + type: {:list, :string}, + description: "List of hosts with scheme to bypass the mediaproxy", + suggestions: ["http://example.com"] + } + ] + }, %{ group: :pleroma, key: Pleroma.Web.MediaProxy.Invalidation.Http, @@ -3587,13 +3658,13 @@ config :pleroma, :config_description, [ key: :primary, type: :map, description: "Primary frontend, the one that is served for all pages by default", - children: frontend_options + children: installed_frontend_options }, %{ key: :admin, type: :map, description: "Admin frontend", - children: frontend_options + children: installed_frontend_options }, %{ key: :available,