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.

226 lines
5.8KB

  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_retained: 180,
  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. # Configures the endpoint
  47. config :pleroma, Pleroma.Web.Endpoint,
  48. url: [host: "localhost"],
  49. http: [
  50. dispatch: [
  51. {:_,
  52. [
  53. {"/api/v1/streaming", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []},
  54. {:_, Plug.Adapters.Cowboy.Handler, {Pleroma.Web.Endpoint, []}}
  55. ]}
  56. ]
  57. ],
  58. protocol: "https",
  59. secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
  60. signing_salt: "CqaoopA2",
  61. render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
  62. pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
  63. secure_cookie_flag: true
  64. # Configures Elixir's Logger
  65. config :logger, :console,
  66. format: "$time $metadata[$level] $message\n",
  67. metadata: [:request_id]
  68. config :mime, :types, %{
  69. "application/xml" => ["xml"],
  70. "application/xrd+xml" => ["xrd+xml"],
  71. "application/jrd+json" => ["jrd+json"],
  72. "application/activity+json" => ["activity+json"],
  73. "application/ld+json" => ["activity+json"]
  74. }
  75. config :pleroma, :websub, Pleroma.Web.Websub
  76. config :pleroma, :ostatus, Pleroma.Web.OStatus
  77. config :pleroma, :httpoison, Pleroma.HTTP
  78. config :tesla, adapter: Tesla.Adapter.Hackney
  79. # Configures http settings, upstream proxy etc.
  80. config :pleroma, :http, proxy_url: nil
  81. config :pleroma, :instance,
  82. name: "Pleroma",
  83. email: "example@example.com",
  84. description: "A Pleroma instance, an alternative fediverse server",
  85. limit: 5000,
  86. upload_limit: 16_000_000,
  87. avatar_upload_limit: 2_000_000,
  88. background_upload_limit: 4_000_000,
  89. banner_upload_limit: 4_000_000,
  90. registrations_open: true,
  91. federating: true,
  92. allow_relay: true,
  93. rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
  94. public: true,
  95. quarantined_instances: [],
  96. managed_config: true,
  97. static_dir: "instance/static/",
  98. allowed_post_formats: [
  99. "text/plain",
  100. "text/html",
  101. "text/markdown"
  102. ],
  103. finmoji_enabled: true,
  104. mrf_transparency: true
  105. config :pleroma, :markup,
  106. # XXX - unfortunately, inline images must be enabled by default right now, because
  107. # of custom emoji. Issue #275 discusses defanging that somehow.
  108. allow_inline_images: true,
  109. allow_headings: false,
  110. allow_tables: false,
  111. allow_fonts: false,
  112. scrub_policy: [
  113. Pleroma.HTML.Transform.MediaProxy,
  114. Pleroma.HTML.Scrubber.Default
  115. ]
  116. config :pleroma, :fe,
  117. theme: "pleroma-dark",
  118. logo: "/static/logo.png",
  119. logo_mask: true,
  120. logo_margin: "0.1em",
  121. background: "/static/aurora_borealis.jpg",
  122. redirect_root_no_login: "/~/main/all",
  123. redirect_root_login: "/~/main/friends",
  124. show_instance_panel: true,
  125. scope_options_enabled: false,
  126. formatting_options_enabled: false,
  127. collapse_message_with_subject: false,
  128. hide_post_stats: false,
  129. hide_user_stats: false,
  130. scope_copy: true,
  131. subject_line_behavior: "email",
  132. always_show_subject_input: true
  133. config :pleroma, :activitypub,
  134. accept_blocks: true,
  135. unfollow_blocked: true,
  136. outgoing_blocks: true,
  137. follow_handshake_timeout: 500
  138. config :pleroma, :user, deny_follow_blocked: true
  139. config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
  140. config :pleroma, :mrf_rejectnonpublic,
  141. allow_followersonly: false,
  142. allow_direct: false
  143. config :pleroma, :mrf_hellthread, threshold: 10
  144. config :pleroma, :mrf_simple,
  145. media_removal: [],
  146. media_nsfw: [],
  147. federated_timeline_removal: [],
  148. reject: [],
  149. accept: []
  150. config :pleroma, :media_proxy,
  151. enabled: false,
  152. # base_url: "https://cache.pleroma.social",
  153. proxy_opts: [
  154. # inline_content_types: [] | false | true,
  155. # http: [:insecure]
  156. ]
  157. config :pleroma, :chat, enabled: true
  158. config :ecto, json_library: Jason
  159. config :phoenix, :format_encoders, json: Jason
  160. config :pleroma, :gopher,
  161. enabled: false,
  162. ip: {0, 0, 0, 0},
  163. port: 9999
  164. config :pleroma, :suggestions,
  165. enabled: false,
  166. third_party_engine:
  167. "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
  168. timeout: 300_000,
  169. limit: 23,
  170. web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
  171. config :pleroma, :http_security,
  172. enabled: true,
  173. sts: false,
  174. sts_max_age: 31_536_000,
  175. ct_max_age: 2_592_000,
  176. referrer_policy: "same-origin"
  177. config :cors_plug,
  178. max_age: 86_400,
  179. methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
  180. expose: [
  181. "Link",
  182. "X-RateLimit-Reset",
  183. "X-RateLimit-Limit",
  184. "X-RateLimit-Remaining",
  185. "X-Request-Id",
  186. "Idempotency-Key"
  187. ],
  188. credentials: true,
  189. headers: ["Authorization", "Content-Type", "Idempotency-Key"]
  190. # Import environment specific config. This must remain at the bottom
  191. # of this file so it overrides the configuration defined above.
  192. import_config "#{Mix.env()}.exs"