Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (193 commits) Remove search result order for non-RUM indexes Update `auto_linker` dependency Document TagPolicy in `rewrite_policy` section Import release config from env variable or /etc/pleroma/config.exs and warn if the file is missing Add option to restrict all users to local content Better default parameters for suggestion Update `plug` dependency Update `ex_rated` dependency Replace `MastodonAPIController.account_register/2` rate limiter Update CHANGELOG Add rate limiting for search endpoints Add RateLimiter Remove unused imports and aliases from migration Update pleroma_ctl Add more tests for using media_proxy and whitelists Add a changelog entry for releases specify that a version is needed for rollback Add migrate/rollback to release tasks Fix wrong placement of serve_endpoints Use Mix.shell().yes? if available ...
This commit is contained in:
commit
f0e2fb1609
168 changed files with 5700 additions and 1553 deletions
|
|
@ -184,9 +184,6 @@ config :mime, :types, %{
|
|||
"application/ld+json" => ["activity+json"]
|
||||
}
|
||||
|
||||
config :pleroma, :websub, Pleroma.Web.Websub
|
||||
config :pleroma, :ostatus, Pleroma.Web.OStatus
|
||||
config :pleroma, :httpoison, Pleroma.HTTP
|
||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||
|
||||
# Configures http settings, upstream proxy etc.
|
||||
|
|
@ -211,6 +208,12 @@ config :pleroma, :instance,
|
|||
avatar_upload_limit: 2_000_000,
|
||||
background_upload_limit: 4_000_000,
|
||||
banner_upload_limit: 4_000_000,
|
||||
poll_limits: %{
|
||||
max_options: 20,
|
||||
max_option_chars: 200,
|
||||
min_expiration: 0,
|
||||
max_expiration: 365 * 24 * 60 * 60
|
||||
},
|
||||
registrations_open: true,
|
||||
federating: true,
|
||||
federation_reachability_timeout_days: 7,
|
||||
|
|
@ -241,9 +244,10 @@ config :pleroma, :instance,
|
|||
welcome_message: nil,
|
||||
max_report_comment_size: 1000,
|
||||
safe_dm_mentions: false,
|
||||
healthcheck: false
|
||||
|
||||
config :pleroma, :app_account_creation, enabled: true, max_requests: 25, interval: 1800
|
||||
healthcheck: false,
|
||||
remote_post_retention_days: 90,
|
||||
skip_thread_containment: true,
|
||||
limit_to_local_content: :unauthenticated
|
||||
|
||||
config :pleroma, :markup,
|
||||
# XXX - unfortunately, inline images must be enabled by default right now, because
|
||||
|
|
@ -326,13 +330,17 @@ config :pleroma, :mrf_simple,
|
|||
],
|
||||
report_removal: [],
|
||||
reject: [],
|
||||
accept: []
|
||||
accept: [],
|
||||
avatar_removal: [],
|
||||
banner_removal: []
|
||||
|
||||
config :pleroma, :mrf_keyword,
|
||||
reject: [],
|
||||
federated_timeline_removal: [],
|
||||
replace: []
|
||||
|
||||
config :pleroma, :mrf_subchain, match_actor: %{}
|
||||
|
||||
config :pleroma, :rich_media, enabled: true
|
||||
|
||||
config :pleroma, :media_proxy,
|
||||
|
|
@ -365,8 +373,8 @@ config :pleroma, :suggestions,
|
|||
third_party_engine:
|
||||
"http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
|
||||
timeout: 300_000,
|
||||
limit: 23,
|
||||
web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
|
||||
limit: 40,
|
||||
web: "https://vinayaka.distsn.org"
|
||||
|
||||
config :pleroma, :http_security,
|
||||
enabled: true,
|
||||
|
|
@ -397,6 +405,7 @@ config :pleroma, Pleroma.User,
|
|||
"activities",
|
||||
"api",
|
||||
"auth",
|
||||
"check_password",
|
||||
"dev",
|
||||
"friend-requests",
|
||||
"inbox",
|
||||
|
|
@ -417,6 +426,7 @@ config :pleroma, Pleroma.User,
|
|||
"status",
|
||||
"tag",
|
||||
"user-search",
|
||||
"user_exists",
|
||||
"users",
|
||||
"web"
|
||||
]
|
||||
|
|
@ -464,7 +474,11 @@ config :pleroma, :ldap,
|
|||
config :esshd,
|
||||
enabled: false
|
||||
|
||||
oauth_consumer_strategies = String.split(System.get_env("OAUTH_CONSUMER_STRATEGIES") || "")
|
||||
oauth_consumer_strategies =
|
||||
System.get_env("OAUTH_CONSUMER_STRATEGIES")
|
||||
|> to_string()
|
||||
|> String.split()
|
||||
|> Enum.map(&hd(String.split(&1, ":")))
|
||||
|
||||
ueberauth_providers =
|
||||
for strategy <- oauth_consumer_strategies do
|
||||
|
|
@ -491,13 +505,21 @@ config :pleroma, Pleroma.ScheduledActivity,
|
|||
|
||||
config :pleroma, :oauth2,
|
||||
token_expires_in: 600,
|
||||
issue_new_refresh_token: true
|
||||
issue_new_refresh_token: true,
|
||||
clean_expired_tokens: false,
|
||||
clean_expired_tokens_interval: 86_400_000
|
||||
|
||||
config :pleroma, :database, rum_enabled: false
|
||||
|
||||
config :pleroma, :env, Mix.env()
|
||||
|
||||
config :http_signatures,
|
||||
adapter: Pleroma.Signature
|
||||
|
||||
config :pleroma, :rate_limit,
|
||||
search: [{1000, 10}, {1000, 30}],
|
||||
app_account_creation: {1_800_000, 25}
|
||||
|
||||
# Import environment specific config. This must remain at the bottom
|
||||
# of this file so it overrides the configuration defined above.
|
||||
import_config "#{Mix.env()}.exs"
|
||||
|
|
|
|||
25
config/dokku.exs
Normal file
25
config/dokku.exs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
use Mix.Config
|
||||
|
||||
config :pleroma, Pleroma.Web.Endpoint,
|
||||
http: [
|
||||
port: String.to_integer(System.get_env("PORT") || "4000"),
|
||||
protocol_options: [max_request_line_length: 8192, max_header_value_length: 8192]
|
||||
],
|
||||
protocol: "http",
|
||||
secure_cookie_flag: false,
|
||||
url: [host: System.get_env("APP_HOST"), scheme: "https", port: 443],
|
||||
secret_key_base: "+S+ULgf7+N37c/lc9K66SMphnjQIRGklTu0BRr2vLm2ZzvK0Z6OH/PE77wlUNtvP"
|
||||
|
||||
database_url =
|
||||
System.get_env("DATABASE_URL") ||
|
||||
raise """
|
||||
environment variable DATABASE_URL is missing.
|
||||
For example: ecto://USER:PASS@HOST/DATABASE
|
||||
"""
|
||||
|
||||
config :pleroma, Pleroma.Repo,
|
||||
# ssl: true,
|
||||
url: database_url,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
|
||||
|
||||
config :pleroma, :instance, name: "#{System.get_env("APP_NAME")} CI Instance"
|
||||
|
|
@ -17,8 +17,10 @@ config :pleroma, Pleroma.Web.Endpoint,
|
|||
http: [port: 4000],
|
||||
protocol: "http"
|
||||
|
||||
config :phoenix, serve_endpoints: true
|
||||
|
||||
# Do not print debug messages in production
|
||||
config :logger, level: :info
|
||||
config :logger, level: :warn
|
||||
|
||||
# ## SSL Support
|
||||
#
|
||||
|
|
|
|||
16
config/releases.exs
Normal file
16
config/releases.exs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import Config
|
||||
|
||||
config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs"
|
||||
|
||||
if File.exists?(config_path) do
|
||||
import_config config_path
|
||||
else
|
||||
warning = [
|
||||
IO.ANSI.red(),
|
||||
IO.ANSI.bright(),
|
||||
"!!! #{config_path} not found! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file",
|
||||
IO.ANSI.reset()
|
||||
]
|
||||
|
||||
IO.puts(warning)
|
||||
end
|
||||
|
|
@ -17,6 +17,8 @@ config :pleroma, Pleroma.Captcha,
|
|||
# Print only warnings and errors during test
|
||||
config :logger, level: :warn
|
||||
|
||||
config :pleroma, :auth, oauth_consumer_strategies: []
|
||||
|
||||
config :pleroma, Pleroma.Upload, filters: [], link_name: false
|
||||
|
||||
config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"
|
||||
|
|
@ -25,7 +27,8 @@ config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test
|
|||
|
||||
config :pleroma, :instance,
|
||||
email: "admin@example.com",
|
||||
notify_email: "noreply@example.com"
|
||||
notify_email: "noreply@example.com",
|
||||
skip_thread_containment: false
|
||||
|
||||
# Configure your database
|
||||
config :pleroma, Pleroma.Repo,
|
||||
|
|
@ -39,8 +42,6 @@ config :pleroma, Pleroma.Repo,
|
|||
# Reduce hash rounds for testing
|
||||
config :pbkdf2_elixir, rounds: 1
|
||||
|
||||
config :pleroma, :websub, Pleroma.Web.WebsubMock
|
||||
config :pleroma, :ostatus, Pleroma.Web.OStatusMock
|
||||
config :tesla, adapter: Tesla.Mock
|
||||
config :pleroma, :rich_media, enabled: false
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ config :pleroma, Pleroma.ScheduledActivity,
|
|||
total_user_limit: 3,
|
||||
enabled: false
|
||||
|
||||
config :pleroma, :app_account_creation, max_requests: 5
|
||||
config :pleroma, :rate_limit, app_account_creation: {1000, 5}
|
||||
|
||||
config :pleroma, :http_security, report_uri: "https://endpoint.com"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue