diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 7 | ||||
-rw-r--r-- | config/description.exs | 220 | ||||
-rw-r--r-- | config/test.exs | 6 |
3 files changed, 39 insertions, 194 deletions
diff --git a/config/config.exs b/config/config.exs index 9d1e29c0d..2cd741213 100644 --- a/config/config.exs +++ b/config/config.exs @@ -402,6 +402,8 @@ config :phoenix, :format_encoders, json: Jason config :phoenix, :json_library, Jason +config :phoenix, :filter_parameters, ["password", "confirm"] + config :pleroma, :gopher, enabled: false, ip: {0, 0, 0, 0}, @@ -597,6 +599,7 @@ config :http_signatures, config :pleroma, :rate_limit, authentication: {60_000, 15}, + timeline: {500, 3}, search: [{1000, 10}, {1000, 30}], app_account_creation: {1_800_000, 25}, relations_actions: {10_000, 10}, @@ -621,7 +624,9 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false -config :pleroma, Pleroma.Repo, parameters: [gin_fuzzy_search_limit: "500"] +config :pleroma, Pleroma.Repo, + parameters: [gin_fuzzy_search_limit: "500"], + prepare: :unnamed # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/config/description.exs b/config/description.exs index f0d1077fd..9fdcfcd96 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1617,160 +1617,6 @@ config :pleroma, :config_description, [ }, %{ group: :pleroma, - key: Pleroma.Web.Endpoint, - type: :group, - description: "Phoenix endpoint configuration", - children: [ - %{ - key: :http, - label: "HTTP", - type: {:keyword, :integer, :tuple}, - description: "http protocol configuration", - suggestions: [ - port: 8080, - ip: {127, 0, 0, 1} - ], - children: [ - %{ - key: :dispatch, - type: {:list, :tuple}, - description: "dispatch settings", - suggestions: [ - {:_, - [ - {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []}, - {"/websocket", Phoenix.Endpoint.CowboyWebSocket, - {Phoenix.Transports.WebSocket, - {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}}, - {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}} - ]} - # end copied from config.exs - ] - }, - %{ - key: :ip, - label: "IP", - type: :tuple, - description: "ip", - suggestions: [ - {0, 0, 0, 0} - ] - }, - %{ - key: :port, - type: :integer, - description: "port", - suggestions: [ - 2020 - ] - } - ] - }, - %{ - key: :url, - label: "URL", - type: {:keyword, :string, :integer}, - description: "configuration for generating urls", - suggestions: [ - host: "example.com", - port: 2020, - scheme: "https" - ], - children: [ - %{ - key: :host, - type: :string, - description: "Host", - suggestions: [ - "example.com" - ] - }, - %{ - key: :port, - type: :integer, - description: "port", - suggestions: [ - 2020 - ] - }, - %{ - key: :scheme, - type: :string, - description: "Scheme", - suggestions: [ - "https", - "https" - ] - } - ] - }, - %{ - key: :instrumenters, - type: {:list, :module}, - suggestions: [Pleroma.Web.Endpoint.Instrumenter] - }, - %{ - key: :protocol, - type: :string, - suggestions: ["https"] - }, - %{ - key: :secret_key_base, - type: :string, - suggestions: ["aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl"] - }, - %{ - key: :signing_salt, - type: :string, - suggestions: ["CqaoopA2"] - }, - %{ - key: :render_errors, - type: :keyword, - suggestions: [view: Pleroma.Web.ErrorView, accepts: ~w(json)], - children: [ - %{ - key: :view, - type: :module, - suggestions: [Pleroma.Web.ErrorView] - }, - %{ - key: :accepts, - type: {:list, :string}, - suggestions: ["json"] - } - ] - }, - %{ - key: :pubsub, - type: :keyword, - suggestions: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2], - children: [ - %{ - key: :name, - type: :module, - suggestions: [Pleroma.PubSub] - }, - %{ - key: :adapter, - type: :module, - suggestions: [Phoenix.PubSub.PG2] - } - ] - }, - %{ - key: :secure_cookie_flag, - type: :boolean - }, - %{ - key: :extra_cookie_attrs, - type: {:list, :string}, - suggestions: ["SameSite=Lax"] - } - ] - }, - %{ - group: :pleroma, key: :activitypub, type: :group, description: "ActivityPub-related settings", @@ -2057,6 +1903,18 @@ config :pleroma, :config_description, [ suggestions: [50] } ] + }, + %{ + key: :crontab, + type: {:list, :tuple}, + description: "Settings for cron background jobs", + suggestions: [ + {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker}, + {"0 * * * *", Pleroma.Workers.Cron.StatsWorker}, + {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker}, + {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker}, + {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker} + ] } ] }, @@ -2596,19 +2454,6 @@ config :pleroma, :config_description, [ }, %{ group: :pleroma, - key: :database, - type: :group, - description: "Database related settings", - children: [ - %{ - key: :rum_enabled, - type: :boolean, - description: "If RUM indexes should be used. Default: disabled" - } - ] - }, - %{ - group: :pleroma, key: :rate_limit, type: :group, description: @@ -2621,6 +2466,12 @@ config :pleroma, :config_description, [ suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] }, %{ + key: :timeline, + type: [:tuple, {:list, :tuple}], + description: "For requests to timelines (each timeline has it's own limiter)", + suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]] + }, + %{ key: :app_account_creation, type: [:tuple, {:list, :tuple}], description: "For registering user accounts from the same IP address", @@ -2771,20 +2622,6 @@ config :pleroma, :config_description, [ ] }, %{ - group: :prometheus, - key: Pleroma.Web.Endpoint.MetricsExporter, - type: :group, - description: "Prometheus settings", - children: [ - %{ - key: :path, - type: :string, - description: "API endpoint with metrics", - suggestions: ["/api/pleroma/app_metrics"] - } - ] - }, - %{ group: :http_signatures, type: :group, description: "HTTP Signatures settings", @@ -3051,7 +2888,7 @@ config :pleroma, :config_description, [ group: :pleroma, key: :feed, type: :group, - description: "Configure feed rendering.", + description: "Configure feed rendering", children: [ %{ key: :post_title, @@ -3101,7 +2938,7 @@ config :pleroma, :config_description, [ group: :pleroma, key: :modules, type: :group, - description: "Custom Runtime Modules.", + description: "Custom Runtime Modules", children: [ %{ key: :runtime_dir, @@ -3112,14 +2949,21 @@ config :pleroma, :config_description, [ }, %{ group: :pleroma, + key: :streamer, type: :group, - description: "Allow instance configuration from database.", + description: "Settings for notifications streamer", children: [ %{ - key: :configurable_from_database, - type: :boolean, - description: - "Allow transferring configuration to DB with the subsequent customization from Admin api. Default: disabled" + key: :workers, + type: :integer, + description: "Number of workers to send notifications.", + suggestions: [3] + }, + %{ + key: :overflow_workers, + type: :integer, + description: "Maximum number of workers created if pool is empty.", + suggestions: [2] } ] } diff --git a/config/test.exs b/config/test.exs index f4642fe02..1011e3c31 100644 --- a/config/test.exs +++ b/config/test.exs @@ -75,11 +75,7 @@ config :pleroma, Pleroma.ScheduledActivity, total_user_limit: 3, enabled: false -config :pleroma, :rate_limit, - search: [{1000, 30}, {1000, 30}], - app_account_creation: {10_000, 5}, - password_reset: {1000, 30}, - ap_routes: nil +config :pleroma, :rate_limit, %{} config :pleroma, :http_security, report_uri: "https://endpoint.com" |