Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

284 lines
7.0KB

  1. # This file is responsible for configuring your application
  2. # and its dependencies with the aid of the Mix.Config module.
  3. #
  4. # This configuration file is loaded before any dependency and
  5. # is restricted to this project.
  6. use Mix.Config
  7. # General application configuration
  8. config :pleroma, ecto_repos: [Pleroma.Repo]
  9. config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
  10. config :pleroma, Pleroma.Captcha,
  11. enabled: false,
  12. seconds_valid: 60,
  13. method: Pleroma.Captcha.Kocaptcha
  14. config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
  15. # Upload configuration
  16. config :pleroma, Pleroma.Upload,
  17. uploader: Pleroma.Uploaders.Local,
  18. filters: [],
  19. proxy_remote: false,
  20. proxy_opts: []
  21. config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
  22. config :pleroma, Pleroma.Uploaders.S3,
  23. bucket: nil,
  24. public_endpoint: "https://s3.amazonaws.com"
  25. config :pleroma, Pleroma.Uploaders.MDII,
  26. cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
  27. files: "https://mdii.sakura.ne.jp"
  28. config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
  29. config :pleroma, :uri_schemes,
  30. valid_schemes: [
  31. "https",
  32. "http",
  33. "dat",
  34. "dweb",
  35. "gopher",
  36. "ipfs",
  37. "ipns",
  38. "irc",
  39. "ircs",
  40. "magnet",
  41. "mailto",
  42. "mumble",
  43. "ssb",
  44. "xmpp"
  45. ]
  46. websocket_config = [
  47. path: "/websocket",
  48. serializer: [
  49. {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
  50. {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
  51. ],
  52. timeout: 60_000,
  53. transport_log: false,
  54. compress: false
  55. ]
  56. # Configures the endpoint
  57. config :pleroma, Pleroma.Web.Endpoint,
  58. url: [host: "localhost"],
  59. http: [
  60. dispatch: [
  61. {:_,
  62. [
  63. {"/api/v1/streaming", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []},
  64. {"/socket/websocket", Phoenix.Endpoint.CowboyWebSocket,
  65. {nil, {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
  66. {:_, Plug.Adapters.Cowboy.Handler, {Pleroma.Web.Endpoint, []}}
  67. ]}
  68. ]
  69. ],
  70. protocol: "https",
  71. secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
  72. signing_salt: "CqaoopA2",
  73. render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
  74. pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
  75. secure_cookie_flag: true
  76. # Configures Elixir's Logger
  77. config :logger, :console,
  78. format: "$time $metadata[$level] $message\n",
  79. metadata: [:request_id]
  80. config :logger, :ex_syslogger,
  81. level: :debug,
  82. ident: "Pleroma",
  83. format: "$date $time $metadata[$level] $message",
  84. metadata: [:request_id]
  85. config :mime, :types, %{
  86. "application/xml" => ["xml"],
  87. "application/xrd+xml" => ["xrd+xml"],
  88. "application/jrd+json" => ["jrd+json"],
  89. "application/activity+json" => ["activity+json"],
  90. "application/ld+json" => ["activity+json"]
  91. }
  92. config :pleroma, :websub, Pleroma.Web.Websub
  93. config :pleroma, :ostatus, Pleroma.Web.OStatus
  94. config :pleroma, :httpoison, Pleroma.HTTP
  95. config :tesla, adapter: Tesla.Adapter.Hackney
  96. # Configures http settings, upstream proxy etc.
  97. config :pleroma, :http, proxy_url: nil
  98. config :pleroma, :instance,
  99. name: "Pleroma",
  100. email: "example@example.com",
  101. description: "A Pleroma instance, an alternative fediverse server",
  102. limit: 5_000,
  103. remote_limit: 100_000,
  104. upload_limit: 16_000_000,
  105. avatar_upload_limit: 2_000_000,
  106. background_upload_limit: 4_000_000,
  107. banner_upload_limit: 4_000_000,
  108. registrations_open: true,
  109. federating: true,
  110. allow_relay: true,
  111. rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
  112. public: true,
  113. quarantined_instances: [],
  114. managed_config: true,
  115. static_dir: "instance/static/",
  116. allowed_post_formats: [
  117. "text/plain",
  118. "text/html",
  119. "text/markdown"
  120. ],
  121. finmoji_enabled: true,
  122. mrf_transparency: true,
  123. autofollowed_nicknames: [],
  124. max_pinned_statuses: 1
  125. config :pleroma, :markup,
  126. # XXX - unfortunately, inline images must be enabled by default right now, because
  127. # of custom emoji. Issue #275 discusses defanging that somehow.
  128. allow_inline_images: true,
  129. allow_headings: false,
  130. allow_tables: false,
  131. allow_fonts: false,
  132. scrub_policy: [
  133. Pleroma.HTML.Transform.MediaProxy,
  134. Pleroma.HTML.Scrubber.Default
  135. ]
  136. config :pleroma, :fe,
  137. theme: "pleroma-dark",
  138. logo: "/static/logo.png",
  139. logo_mask: true,
  140. logo_margin: "0.1em",
  141. background: "/static/aurora_borealis.jpg",
  142. redirect_root_no_login: "/main/all",
  143. redirect_root_login: "/main/friends",
  144. show_instance_panel: true,
  145. scope_options_enabled: false,
  146. formatting_options_enabled: false,
  147. collapse_message_with_subject: false,
  148. hide_post_stats: false,
  149. hide_user_stats: false,
  150. scope_copy: true,
  151. subject_line_behavior: "email",
  152. always_show_subject_input: true
  153. config :pleroma, :activitypub,
  154. accept_blocks: true,
  155. unfollow_blocked: true,
  156. outgoing_blocks: true,
  157. follow_handshake_timeout: 500
  158. config :pleroma, :user, deny_follow_blocked: true
  159. config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
  160. config :pleroma, :mrf_rejectnonpublic,
  161. allow_followersonly: false,
  162. allow_direct: false
  163. config :pleroma, :mrf_hellthread, threshold: 10
  164. config :pleroma, :mrf_simple,
  165. media_removal: [],
  166. media_nsfw: [],
  167. federated_timeline_removal: [],
  168. reject: [],
  169. accept: []
  170. config :pleroma, :media_proxy, enabled: false
  171. config :pleroma, :chat, enabled: true
  172. config :ecto, json_library: Jason
  173. config :phoenix, :format_encoders, json: Jason
  174. config :pleroma, :gopher,
  175. enabled: false,
  176. ip: {0, 0, 0, 0},
  177. port: 9999
  178. config :pleroma, :metadata, providers: []
  179. config :pleroma, :suggestions,
  180. enabled: false,
  181. third_party_engine:
  182. "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
  183. timeout: 300_000,
  184. limit: 23,
  185. web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
  186. config :pleroma, :http_security,
  187. enabled: true,
  188. sts: false,
  189. sts_max_age: 31_536_000,
  190. ct_max_age: 2_592_000,
  191. referrer_policy: "same-origin"
  192. config :cors_plug,
  193. max_age: 86_400,
  194. methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
  195. expose: [
  196. "Link",
  197. "X-RateLimit-Reset",
  198. "X-RateLimit-Limit",
  199. "X-RateLimit-Remaining",
  200. "X-Request-Id",
  201. "Idempotency-Key"
  202. ],
  203. credentials: true,
  204. headers: ["Authorization", "Content-Type", "Idempotency-Key"]
  205. config :pleroma, Pleroma.User,
  206. restricted_nicknames: [
  207. ".well-known",
  208. "~",
  209. "about",
  210. "activities",
  211. "api",
  212. "auth",
  213. "dev",
  214. "friend-requests",
  215. "inbox",
  216. "internal",
  217. "main",
  218. "media",
  219. "nodeinfo",
  220. "notice",
  221. "oauth",
  222. "objects",
  223. "ostatus_subscribe",
  224. "pleroma",
  225. "proxy",
  226. "push",
  227. "registration",
  228. "relay",
  229. "settings",
  230. "status",
  231. "tag",
  232. "user-search",
  233. "users",
  234. "web"
  235. ]
  236. config :pleroma, Pleroma.Web.Federator, max_jobs: 50
  237. config :pleroma, Pleroma.Web.Federator.RetryQueue,
  238. enabled: false,
  239. max_jobs: 20,
  240. initial_timeout: 30,
  241. max_retries: 5
  242. # Import environment specific config. This must remain at the bottom
  243. # of this file so it overrides the configuration defined above.
  244. import_config "#{Mix.env()}.exs"