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.

470 lines
13KB

  1. # .i;;;;i.
  2. # iYcviii;vXY:
  3. # .YXi .i1c.
  4. # .YC. . in7.
  5. # .vc. ...... ;1c.
  6. # i7, .. .;1;
  7. # i7, .. ... .Y1i
  8. # ,7v .6MMM@; .YX,
  9. # .7;. ..IMMMMMM1 :t7.
  10. # .;Y. ;$MMMMMM9. :tc.
  11. # vY. .. .nMMM@MMU. ;1v.
  12. # i7i ... .#MM@M@C. .....:71i
  13. # it: .... $MMM@9;.,i;;;i,;tti
  14. # :t7. ..... 0MMMWv.,iii:::,,;St.
  15. # .nC. ..... IMMMQ..,::::::,.,czX.
  16. # .ct: ....... .ZMMMI..,:::::::,,:76Y.
  17. # c2: ......,i..Y$M@t..:::::::,,..inZY
  18. # vov ......:ii..c$MBc..,,,,,,,,,,..iI9i
  19. # i9Y ......iii:..7@MA,..,,,,,,,,,....;AA:
  20. # iIS. ......:ii::..;@MI....,............;Ez.
  21. # .I9. ......:i::::...8M1..................C0z.
  22. # .z9; ......:i::::,.. .i:...................zWX.
  23. # vbv ......,i::::,,. ................. :AQY
  24. # c6Y. .,...,::::,,..:t0@@QY. ................ :8bi
  25. # :6S. ..,,...,:::,,,..EMMMMMMI. ............... .;bZ,
  26. # :6o, .,,,,..:::,,,..i#MMMMMM#v................. YW2.
  27. # .n8i ..,,,,,,,::,,,,.. tMMMMM@C:.................. .1Wn
  28. # 7Uc. .:::,,,,,::,,,,.. i1t;,..................... .UEi
  29. # 7C...::::::::::::,,,,.. .................... vSi.
  30. # ;1;...,,::::::,......... .................. Yz:
  31. # v97,......... .voC.
  32. # izAotX7777777777777777777777777777777777777777Y7n92:
  33. # .;CoIIIIIUAA666666699999ZZZZZZZZZZZZZZZZZZZZ6ov.
  34. #
  35. # !!! ATTENTION !!!
  36. # DO NOT EDIT THIS FILE! THIS FILE CONTAINS THE DEFAULT VALUES FOR THE CON-
  37. # FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
  38. #
  39. # This file is responsible for configuring your application
  40. # and its dependencies with the aid of the Mix.Config module.
  41. #
  42. # This configuration file is loaded before any dependency and
  43. # is restricted to this project.
  44. use Mix.Config
  45. # General application configuration
  46. config :pleroma, ecto_repos: [Pleroma.Repo]
  47. config :pleroma, Pleroma.Repo,
  48. types: Pleroma.PostgresTypes,
  49. telemetry_event: [Pleroma.Repo.Instrumenter]
  50. config :pleroma, Pleroma.Captcha,
  51. enabled: false,
  52. seconds_valid: 60,
  53. method: Pleroma.Captcha.Kocaptcha
  54. config :pleroma, :hackney_pools,
  55. federation: [
  56. max_connections: 50,
  57. timeout: 150_000
  58. ],
  59. media: [
  60. max_connections: 50,
  61. timeout: 150_000
  62. ],
  63. upload: [
  64. max_connections: 25,
  65. timeout: 300_000
  66. ]
  67. config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
  68. # Upload configuration
  69. config :pleroma, Pleroma.Upload,
  70. uploader: Pleroma.Uploaders.Local,
  71. filters: [Pleroma.Upload.Filter.Dedupe],
  72. link_name: true,
  73. proxy_remote: false,
  74. proxy_opts: [
  75. redirect_on_failure: false,
  76. max_body_length: 25 * 1_048_576,
  77. http: [
  78. follow_redirect: true,
  79. pool: :upload
  80. ]
  81. ]
  82. config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
  83. config :pleroma, Pleroma.Uploaders.S3,
  84. bucket: nil,
  85. public_endpoint: "https://s3.amazonaws.com"
  86. config :pleroma, Pleroma.Uploaders.MDII,
  87. cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
  88. files: "https://mdii.sakura.ne.jp"
  89. config :pleroma, :emoji,
  90. shortcode_globs: ["/emoji/custom/**/*.png"],
  91. groups: [
  92. # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
  93. Finmoji: "/finmoji/128px/*-128.png",
  94. Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
  95. ]
  96. config :pleroma, :uri_schemes,
  97. valid_schemes: [
  98. "https",
  99. "http",
  100. "dat",
  101. "dweb",
  102. "gopher",
  103. "ipfs",
  104. "ipns",
  105. "irc",
  106. "ircs",
  107. "magnet",
  108. "mailto",
  109. "mumble",
  110. "ssb",
  111. "xmpp"
  112. ]
  113. websocket_config = [
  114. path: "/websocket",
  115. serializer: [
  116. {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
  117. {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
  118. ],
  119. timeout: 60_000,
  120. transport_log: false,
  121. compress: false
  122. ]
  123. # Configures the endpoint
  124. config :pleroma, Pleroma.Web.Endpoint,
  125. instrumenters: [Pleroma.Web.Endpoint.Instrumenter],
  126. url: [host: "localhost"],
  127. http: [
  128. dispatch: [
  129. {:_,
  130. [
  131. {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
  132. {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
  133. {Phoenix.Transports.WebSocket,
  134. {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
  135. {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
  136. ]}
  137. ]
  138. ],
  139. protocol: "https",
  140. secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
  141. signing_salt: "CqaoopA2",
  142. render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
  143. pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
  144. secure_cookie_flag: true,
  145. extra_cookie_attrs: [
  146. "SameSite=Lax"
  147. ]
  148. # Configures Elixir's Logger
  149. config :logger, :console,
  150. format: "$time $metadata[$level] $message\n",
  151. metadata: [:request_id]
  152. config :logger, :ex_syslogger,
  153. level: :debug,
  154. ident: "Pleroma",
  155. format: "$metadata[$level] $message",
  156. metadata: [:request_id]
  157. config :quack,
  158. level: :warn,
  159. meta: [:all],
  160. webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
  161. config :mime, :types, %{
  162. "application/xml" => ["xml"],
  163. "application/xrd+xml" => ["xrd+xml"],
  164. "application/jrd+json" => ["jrd+json"],
  165. "application/activity+json" => ["activity+json"],
  166. "application/ld+json" => ["activity+json"]
  167. }
  168. config :pleroma, :websub, Pleroma.Web.Websub
  169. config :pleroma, :ostatus, Pleroma.Web.OStatus
  170. config :pleroma, :httpoison, Pleroma.HTTP
  171. config :tesla, adapter: Tesla.Adapter.Hackney
  172. # Configures http settings, upstream proxy etc.
  173. config :pleroma, :http,
  174. proxy_url: nil,
  175. adapter: [
  176. ssl_options: [
  177. # We don't support TLS v1.3 yet
  178. versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
  179. ]
  180. ]
  181. config :pleroma, :instance,
  182. name: "Pleroma",
  183. email: "example@example.com",
  184. notify_email: "noreply@example.com",
  185. description: "A Pleroma instance, an alternative fediverse server",
  186. limit: 5_000,
  187. remote_limit: 100_000,
  188. upload_limit: 16_000_000,
  189. avatar_upload_limit: 2_000_000,
  190. background_upload_limit: 4_000_000,
  191. banner_upload_limit: 4_000_000,
  192. registrations_open: true,
  193. federating: true,
  194. federation_reachability_timeout_days: 7,
  195. allow_relay: true,
  196. rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
  197. public: true,
  198. quarantined_instances: [],
  199. managed_config: true,
  200. static_dir: "instance/static/",
  201. allowed_post_formats: [
  202. "text/plain",
  203. "text/html",
  204. "text/markdown"
  205. ],
  206. finmoji_enabled: true,
  207. mrf_transparency: true,
  208. autofollowed_nicknames: [],
  209. max_pinned_statuses: 1,
  210. no_attachment_links: false,
  211. welcome_user_nickname: nil,
  212. welcome_message: nil,
  213. max_report_comment_size: 1000,
  214. safe_dm_mentions: false
  215. config :pleroma, :markup,
  216. # XXX - unfortunately, inline images must be enabled by default right now, because
  217. # of custom emoji. Issue #275 discusses defanging that somehow.
  218. allow_inline_images: true,
  219. allow_headings: false,
  220. allow_tables: false,
  221. allow_fonts: false,
  222. scrub_policy: [
  223. Pleroma.HTML.Transform.MediaProxy,
  224. Pleroma.HTML.Scrubber.Default
  225. ]
  226. # Deprecated, will be gone in 1.0
  227. config :pleroma, :fe,
  228. theme: "pleroma-dark",
  229. logo: "/static/logo.png",
  230. logo_mask: true,
  231. logo_margin: "0.1em",
  232. background: "/static/aurora_borealis.jpg",
  233. redirect_root_no_login: "/main/all",
  234. redirect_root_login: "/main/friends",
  235. show_instance_panel: true,
  236. scope_options_enabled: false,
  237. formatting_options_enabled: false,
  238. collapse_message_with_subject: false,
  239. hide_post_stats: false,
  240. hide_user_stats: false,
  241. scope_copy: true,
  242. subject_line_behavior: "email",
  243. always_show_subject_input: true
  244. config :pleroma, :frontend_configurations,
  245. pleroma_fe: %{
  246. theme: "pleroma-dark",
  247. logo: "/static/logo.png",
  248. background: "/images/city.jpg",
  249. redirectRootNoLogin: "/main/all",
  250. redirectRootLogin: "/main/friends",
  251. showInstanceSpecificPanel: true,
  252. scopeOptionsEnabled: false,
  253. formattingOptionsEnabled: false,
  254. collapseMessageWithSubject: false,
  255. hidePostStats: false,
  256. hideUserStats: false,
  257. scopeCopy: true,
  258. subjectLineBehavior: "email",
  259. alwaysShowSubjectInput: true
  260. },
  261. masto_fe: %{
  262. showInstanceSpecificPanel: true
  263. }
  264. config :pleroma, :activitypub,
  265. accept_blocks: true,
  266. unfollow_blocked: true,
  267. outgoing_blocks: true,
  268. follow_handshake_timeout: 500
  269. config :pleroma, :user, deny_follow_blocked: true
  270. config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
  271. config :pleroma, :mrf_rejectnonpublic,
  272. allow_followersonly: false,
  273. allow_direct: false
  274. config :pleroma, :mrf_hellthread,
  275. delist_threshold: 10,
  276. reject_threshold: 20
  277. config :pleroma, :mrf_simple,
  278. media_removal: [],
  279. media_nsfw: [],
  280. federated_timeline_removal: [],
  281. reject: [],
  282. accept: []
  283. config :pleroma, :mrf_keyword,
  284. reject: [],
  285. federated_timeline_removal: [],
  286. replace: []
  287. config :pleroma, :rich_media, enabled: true
  288. config :pleroma, :media_proxy,
  289. enabled: false,
  290. proxy_opts: [
  291. redirect_on_failure: false,
  292. max_body_length: 25 * 1_048_576,
  293. http: [
  294. follow_redirect: true,
  295. pool: :media
  296. ]
  297. ]
  298. config :pleroma, :chat, enabled: true
  299. config :phoenix, :format_encoders, json: Jason
  300. config :pleroma, :gopher,
  301. enabled: false,
  302. ip: {0, 0, 0, 0},
  303. port: 9999
  304. config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
  305. config :pleroma, :suggestions,
  306. enabled: false,
  307. third_party_engine:
  308. "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
  309. timeout: 300_000,
  310. limit: 23,
  311. web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
  312. config :pleroma, :http_security,
  313. enabled: true,
  314. sts: false,
  315. sts_max_age: 31_536_000,
  316. ct_max_age: 2_592_000,
  317. referrer_policy: "same-origin"
  318. config :cors_plug,
  319. max_age: 86_400,
  320. methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
  321. expose: [
  322. "Link",
  323. "X-RateLimit-Reset",
  324. "X-RateLimit-Limit",
  325. "X-RateLimit-Remaining",
  326. "X-Request-Id",
  327. "Idempotency-Key"
  328. ],
  329. credentials: true,
  330. headers: ["Authorization", "Content-Type", "Idempotency-Key"]
  331. config :pleroma, Pleroma.User,
  332. restricted_nicknames: [
  333. ".well-known",
  334. "~",
  335. "about",
  336. "activities",
  337. "api",
  338. "auth",
  339. "dev",
  340. "friend-requests",
  341. "inbox",
  342. "internal",
  343. "main",
  344. "media",
  345. "nodeinfo",
  346. "notice",
  347. "oauth",
  348. "objects",
  349. "ostatus_subscribe",
  350. "pleroma",
  351. "proxy",
  352. "push",
  353. "registration",
  354. "relay",
  355. "settings",
  356. "status",
  357. "tag",
  358. "user-search",
  359. "users",
  360. "web"
  361. ]
  362. config :pleroma, Pleroma.Web.Federator.RetryQueue,
  363. enabled: false,
  364. max_jobs: 20,
  365. initial_timeout: 30,
  366. max_retries: 5
  367. config :pleroma_job_queue, :queues,
  368. federator_incoming: 50,
  369. federator_outgoing: 50,
  370. web_push: 50,
  371. mailer: 10,
  372. transmogrifier: 20,
  373. scheduled_activities: 10
  374. config :pleroma, :fetch_initial_posts,
  375. enabled: false,
  376. pages: 5
  377. config :auto_linker,
  378. opts: [
  379. scheme: true,
  380. extra: true,
  381. class: false,
  382. strip_prefix: false,
  383. new_window: false,
  384. rel: false
  385. ]
  386. config :pleroma, :ldap,
  387. enabled: System.get_env("LDAP_ENABLED") == "true",
  388. host: System.get_env("LDAP_HOST") || "localhost",
  389. port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
  390. ssl: System.get_env("LDAP_SSL") == "true",
  391. sslopts: [],
  392. tls: System.get_env("LDAP_TLS") == "true",
  393. tlsopts: [],
  394. base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
  395. uid: System.get_env("LDAP_UID") || "cn"
  396. oauth_consumer_strategies = String.split(System.get_env("OAUTH_CONSUMER_STRATEGIES") || "")
  397. ueberauth_providers =
  398. for strategy <- oauth_consumer_strategies do
  399. strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
  400. strategy_module = String.to_atom(strategy_module_name)
  401. {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
  402. end
  403. config :ueberauth,
  404. Ueberauth,
  405. base_path: "/oauth",
  406. providers: ueberauth_providers
  407. config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
  408. config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail
  409. config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"
  410. config :pleroma, Pleroma.ScheduledActivity,
  411. daily_user_limit: 25,
  412. total_user_limit: 300,
  413. enabled: true
  414. # Import environment specific config. This must remain at the bottom
  415. # of this file so it overrides the configuration defined above.
  416. import_config "#{Mix.env()}.exs"