diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.exs | 29 | ||||
| -rw-r--r-- | config/description.exs | 62 | ||||
| -rw-r--r-- | config/test.exs | 5 | 
3 files changed, 87 insertions, 9 deletions
| diff --git a/config/config.exs b/config/config.exs index 88c47fd03..00624bf00 100644 --- a/config/config.exs +++ b/config/config.exs @@ -130,6 +130,7 @@ config :pleroma, Pleroma.Web.Endpoint,      dispatch: [        {:_,         [ +         {"/api/fedsocket/v1", Pleroma.Web.FedSockets.IncomingHandler, []},           {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},           {"/websocket", Phoenix.Endpoint.CowboyWebSocket,            {Phoenix.Transports.WebSocket, @@ -148,6 +149,16 @@ config :pleroma, Pleroma.Web.Endpoint,      "SameSite=Lax"    ] +config :pleroma, :fed_sockets, +  enabled: false, +  connection_duration: :timer.hours(8), +  rejection_duration: :timer.minutes(15), +  fed_socket_fetches: [ +    default: 12_000, +    interval: 3_000, +    lazy: false +  ] +  # Configures Elixir's Logger  config :logger, :console,    level: :debug, @@ -216,7 +227,6 @@ config :pleroma, :instance,    allow_relay: true,    public: true,    quarantined_instances: [], -  managed_config: true,    static_dir: "instance/static/",    allowed_post_formats: [      "text/plain", @@ -424,6 +434,8 @@ config :pleroma, :media_proxy,    proxy_opts: [      redirect_on_failure: false,      max_body_length: 25 * 1_048_576, +    # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1 +    max_read_duration: 30_000,      http: [        follow_redirect: true,        pool: :media @@ -438,6 +450,14 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,  config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil +# Note: media preview proxy depends on media proxy to be enabled +config :pleroma, :media_preview_proxy, +  enabled: false, +  thumbnail_max_width: 600, +  thumbnail_max_height: 600, +  image_quality: 85, +  min_content_length: 100 * 1024 +  config :pleroma, :chat, enabled: true  config :phoenix, :format_encoders, json: Jason @@ -533,6 +553,7 @@ config :pleroma, Oban,      token_expiration: 5,      federator_incoming: 50,      federator_outgoing: 50, +    ingestion_queue: 50,      web_push: 50,      mailer: 10,      transmogrifier: 20, @@ -742,8 +763,8 @@ config :pleroma, :pools,    ],    media: [      size: 50, -    max_waiting: 10, -    recv_timeout: 10_000 +    max_waiting: 20, +    recv_timeout: 15_000    ],    upload: [      size: 25, @@ -788,6 +809,8 @@ config :tzdata, :http_client, Pleroma.HTTP.Tzdata  config :ex_aws, http_client: Pleroma.HTTP.ExAws +config :web_push_encryption, http_client: Pleroma.HTTP +  config :pleroma, :instances_favicons, enabled: false  config :floki, :html_parser, Floki.HTMLParser.FastHtml diff --git a/config/description.exs b/config/description.exs index 82c7bc6a7..097e98633 100644 --- a/config/description.exs +++ b/config/description.exs @@ -272,6 +272,19 @@ config :pleroma, :config_description, [    },    %{      group: :pleroma, +    key: :fed_sockets, +    type: :group, +    description: "Websocket based federation", +    children: [ +      %{ +        key: :enabled, +        type: :boolean, +        description: "Enable FedSockets" +      } +    ] +  }, +  %{ +    group: :pleroma,      key: Pleroma.Emails.Mailer,      type: :group,      description: "Mailer-related settings", @@ -765,12 +778,6 @@ config :pleroma, :config_description, [          ]        },        %{ -        key: :managed_config, -        type: :boolean, -        description: -          "Whenether the config for pleroma-fe is configured in this config or in static/config.json" -      }, -      %{          key: :static_dir,          type: :string,          description: "Instance static directory", @@ -1880,6 +1887,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 @@ -1901,6 +1909,11 @@ config :pleroma, :config_description, [                  "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",              type: :keyword, @@ -1948,6 +1961,43 @@ 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 for images (video preview always has original dimensions)." +      }, +      %{ +        key: :thumbnail_max_height, +        type: :integer, +        description: +          "Max height of preview thumbnail for images (video preview always has original dimensions)." +      }, +      %{ +        key: :image_quality, +        type: :integer, +        description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)." +      }, +      %{ +        key: :min_content_length, +        type: :integer, +        description: +          "Min content length to perform preview, in bytes. If greater than 0, media smaller in size will be served as is, without thumbnailing." +      } +    ] +  }, +  %{ +    group: :pleroma,      key: Pleroma.Web.MediaProxy.Invalidation.Http,      type: :group,      description: "HTTP invalidate settings", diff --git a/config/test.exs b/config/test.exs index 0ee6f1b7f..93a0e2a61 100644 --- a/config/test.exs +++ b/config/test.exs @@ -19,6 +19,11 @@ config :logger, :console,    level: :warn,    format: "\n[$level] $message\n" +config :pleroma, :fed_sockets, +  enabled: false, +  connection_duration: 5, +  rejection_duration: 5 +  config :pleroma, :auth, oauth_consumer_strategies: []  config :pleroma, Pleroma.Upload, | 
