diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.exs | 34 | ||||
| -rw-r--r-- | config/description.exs | 78 | ||||
| -rw-r--r-- | config/test.exs | 5 | 
3 files changed, 99 insertions, 18 deletions
| diff --git a/config/config.exs b/config/config.exs index 1a2b312b5..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 @@ -530,8 +550,10 @@ config :pleroma, Oban,    log: false,    queues: [      activity_expiration: 10, +    token_expiration: 5,      federator_incoming: 50,      federator_outgoing: 50, +    ingestion_queue: 50,      web_push: 50,      mailer: 10,      transmogrifier: 20, @@ -543,8 +565,6 @@ config :pleroma, Oban,    ],    plugins: [Oban.Plugins.Pruner],    crontab: [ -    {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, -    {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker},      {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},      {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}    ] @@ -655,7 +675,7 @@ config :pleroma, :rate_limit,    account_confirmation_resend: {8_640_000, 5},    ap_routes: {60_000, 15} -config :pleroma, Pleroma.ActivityExpiration, enabled: true +config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600  config :pleroma, Pleroma.Plugs.RemoteIp, enabled: true @@ -743,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, @@ -789,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 eac97ad64..ac3dfbb2b 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", @@ -2290,8 +2340,6 @@ config :pleroma, :config_description, [          type: {:list, :tuple},          description: "Settings for cron background jobs",          suggestions: [ -          {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, -          {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker},            {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},            {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}          ] @@ -2397,7 +2445,7 @@ config :pleroma, :config_description, [    %{      group: :pleroma,      key: Pleroma.Formatter, -    label: "Auto Linker", +    label: "Linkify",      type: :group,      description:        "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.", @@ -2474,14 +2522,20 @@ config :pleroma, :config_description, [    },    %{      group: :pleroma, -    key: Pleroma.ActivityExpiration, +    key: Pleroma.Workers.PurgeExpiredActivity,      type: :group, -    description: "Expired activity settings", +    description: "Expired activities settings",      children: [        %{          key: :enabled,          type: :boolean, -        description: "Whether expired activities will be sent to the job queue to be deleted" +        description: "Enables expired activities addition & deletion" +      }, +      %{ +        key: :min_lifetime, +        type: :integer, +        description: "Minimum lifetime for ephemeral activity (in seconds)", +        suggestions: [600]        }      ]    }, 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, | 
