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.

206 lines
5.3KB

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