Merge branch 'bugfix/rel-me_list' into 'develop'
[akkoma] / config / config.exs
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
8 # General application configuration
9 config :pleroma, ecto_repos: [Pleroma.Repo]
10
11 config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
12
13 config :pleroma, Pleroma.Captcha,
14 enabled: false,
15 seconds_valid: 60,
16 method: Pleroma.Captcha.Kocaptcha
17
18 config :pleroma, :hackney_pools,
19 federation: [
20 max_connections: 50,
21 timeout: 150_000
22 ],
23 media: [
24 max_connections: 50,
25 timeout: 150_000
26 ],
27 upload: [
28 max_connections: 25,
29 timeout: 300_000
30 ]
31
32 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
33
34 # Upload configuration
35 config :pleroma, Pleroma.Upload,
36 uploader: Pleroma.Uploaders.Local,
37 filters: [],
38 proxy_remote: false,
39 proxy_opts: [
40 redirect_on_failure: false,
41 max_body_length: 25 * 1_048_576,
42 http: [
43 follow_redirect: true,
44 pool: :upload
45 ]
46 ]
47
48 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
49
50 config :pleroma, Pleroma.Uploaders.S3,
51 bucket: nil,
52 public_endpoint: "https://s3.amazonaws.com"
53
54 config :pleroma, Pleroma.Uploaders.MDII,
55 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
56 files: "https://mdii.sakura.ne.jp"
57
58 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
59
60 config :pleroma, :uri_schemes,
61 valid_schemes: [
62 "https",
63 "http",
64 "dat",
65 "dweb",
66 "gopher",
67 "ipfs",
68 "ipns",
69 "irc",
70 "ircs",
71 "magnet",
72 "mailto",
73 "mumble",
74 "ssb",
75 "xmpp"
76 ]
77
78 websocket_config = [
79 path: "/websocket",
80 serializer: [
81 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
82 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
83 ],
84 timeout: 60_000,
85 transport_log: false,
86 compress: false
87 ]
88
89 # Configures the endpoint
90 config :pleroma, Pleroma.Web.Endpoint,
91 url: [host: "localhost"],
92 http: [
93 dispatch: [
94 {:_,
95 [
96 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
97 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
98 {Phoenix.Transports.WebSocket,
99 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
100 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
101 ]}
102 ]
103 ],
104 protocol: "https",
105 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
106 signing_salt: "CqaoopA2",
107 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
108 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
109 secure_cookie_flag: true
110
111 # Configures Elixir's Logger
112 config :logger, :console,
113 format: "$time $metadata[$level] $message\n",
114 metadata: [:request_id]
115
116 config :logger, :ex_syslogger,
117 level: :debug,
118 ident: "Pleroma",
119 format: "$metadata[$level] $message",
120 metadata: [:request_id]
121
122 config :mime, :types, %{
123 "application/xml" => ["xml"],
124 "application/xrd+xml" => ["xrd+xml"],
125 "application/jrd+json" => ["jrd+json"],
126 "application/activity+json" => ["activity+json"],
127 "application/ld+json" => ["activity+json"]
128 }
129
130 config :pleroma, :websub, Pleroma.Web.Websub
131 config :pleroma, :ostatus, Pleroma.Web.OStatus
132 config :pleroma, :httpoison, Pleroma.HTTP
133 config :tesla, adapter: Tesla.Adapter.Hackney
134
135 # Configures http settings, upstream proxy etc.
136 config :pleroma, :http, proxy_url: nil
137
138 config :pleroma, :instance,
139 name: "Pleroma",
140 email: "example@example.com",
141 description: "A Pleroma instance, an alternative fediverse server",
142 limit: 5_000,
143 remote_limit: 100_000,
144 upload_limit: 16_000_000,
145 avatar_upload_limit: 2_000_000,
146 background_upload_limit: 4_000_000,
147 banner_upload_limit: 4_000_000,
148 registrations_open: true,
149 federating: true,
150 federation_reachability_timeout_days: 7,
151 allow_relay: true,
152 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
153 public: true,
154 quarantined_instances: [],
155 managed_config: true,
156 static_dir: "instance/static/",
157 allowed_post_formats: [
158 "text/plain",
159 "text/html",
160 "text/markdown"
161 ],
162 finmoji_enabled: true,
163 mrf_transparency: true,
164 autofollowed_nicknames: [],
165 max_pinned_statuses: 1,
166 no_attachment_links: false,
167 welcome_user_nickname: nil,
168 welcome_message: nil,
169 max_report_comment_size: 1000
170
171 config :pleroma, :markup,
172 # XXX - unfortunately, inline images must be enabled by default right now, because
173 # of custom emoji. Issue #275 discusses defanging that somehow.
174 allow_inline_images: true,
175 allow_headings: false,
176 allow_tables: false,
177 allow_fonts: false,
178 scrub_policy: [
179 Pleroma.HTML.Transform.MediaProxy,
180 Pleroma.HTML.Scrubber.Default
181 ]
182
183 # Deprecated, will be gone in 1.0
184 config :pleroma, :fe,
185 theme: "pleroma-dark",
186 logo: "/static/logo.png",
187 logo_mask: true,
188 logo_margin: "0.1em",
189 background: "/static/aurora_borealis.jpg",
190 redirect_root_no_login: "/main/all",
191 redirect_root_login: "/main/friends",
192 show_instance_panel: true,
193 scope_options_enabled: false,
194 formatting_options_enabled: false,
195 collapse_message_with_subject: false,
196 hide_post_stats: false,
197 hide_user_stats: false,
198 scope_copy: true,
199 subject_line_behavior: "email",
200 always_show_subject_input: true
201
202 config :pleroma, :frontend_configurations,
203 pleroma_fe: %{
204 theme: "pleroma-dark",
205 logo: "/static/logo.png",
206 background: "/images/city.jpg",
207 redirectRootNoLogin: "/main/all",
208 redirectRootLogin: "/main/friends",
209 showInstanceSpecificPanel: true,
210 scopeOptionsEnabled: false,
211 formattingOptionsEnabled: false,
212 collapseMessageWithSubject: false,
213 hidePostStats: false,
214 hideUserStats: false,
215 scopeCopy: true,
216 subjectLineBehavior: "email",
217 alwaysShowSubjectInput: true
218 },
219 masto_fe: %{
220 showInstanceSpecificPanel: true
221 }
222
223 config :pleroma, :activitypub,
224 accept_blocks: true,
225 unfollow_blocked: true,
226 outgoing_blocks: true,
227 follow_handshake_timeout: 500
228
229 config :pleroma, :user, deny_follow_blocked: true
230
231 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
232
233 config :pleroma, :mrf_rejectnonpublic,
234 allow_followersonly: false,
235 allow_direct: false
236
237 config :pleroma, :mrf_hellthread,
238 delist_threshold: 10,
239 reject_threshold: 20
240
241 config :pleroma, :mrf_simple,
242 media_removal: [],
243 media_nsfw: [],
244 federated_timeline_removal: [],
245 reject: [],
246 accept: []
247
248 config :pleroma, :mrf_keyword,
249 reject: [],
250 federated_timeline_removal: [],
251 replace: []
252
253 config :pleroma, :rich_media, enabled: true
254
255 config :pleroma, :media_proxy,
256 enabled: false,
257 proxy_opts: [
258 redirect_on_failure: false,
259 max_body_length: 25 * 1_048_576,
260 http: [
261 follow_redirect: true,
262 pool: :media
263 ]
264 ]
265
266 config :pleroma, :chat, enabled: true
267
268 config :ecto, json_library: Jason
269
270 config :phoenix, :format_encoders, json: Jason
271
272 config :pleroma, :gopher,
273 enabled: false,
274 ip: {0, 0, 0, 0},
275 port: 9999
276
277 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
278
279 config :pleroma, :suggestions,
280 enabled: false,
281 third_party_engine:
282 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
283 timeout: 300_000,
284 limit: 23,
285 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
286
287 config :pleroma, :http_security,
288 enabled: true,
289 sts: false,
290 sts_max_age: 31_536_000,
291 ct_max_age: 2_592_000,
292 referrer_policy: "same-origin"
293
294 config :cors_plug,
295 max_age: 86_400,
296 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
297 expose: [
298 "Link",
299 "X-RateLimit-Reset",
300 "X-RateLimit-Limit",
301 "X-RateLimit-Remaining",
302 "X-Request-Id",
303 "Idempotency-Key"
304 ],
305 credentials: true,
306 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
307
308 config :pleroma, Pleroma.User,
309 restricted_nicknames: [
310 ".well-known",
311 "~",
312 "about",
313 "activities",
314 "api",
315 "auth",
316 "dev",
317 "friend-requests",
318 "inbox",
319 "internal",
320 "main",
321 "media",
322 "nodeinfo",
323 "notice",
324 "oauth",
325 "objects",
326 "ostatus_subscribe",
327 "pleroma",
328 "proxy",
329 "push",
330 "registration",
331 "relay",
332 "settings",
333 "status",
334 "tag",
335 "user-search",
336 "users",
337 "web"
338 ]
339
340 config :pleroma, Pleroma.Web.Federator.RetryQueue,
341 enabled: false,
342 max_jobs: 20,
343 initial_timeout: 30,
344 max_retries: 5
345
346 config :pleroma, Pleroma.Jobs,
347 federator_incoming: [max_jobs: 50],
348 federator_outgoing: [max_jobs: 50],
349 mailer: [max_jobs: 10]
350
351 config :auto_linker,
352 opts: [
353 scheme: true,
354 extra: true,
355 class: false,
356 strip_prefix: false,
357 new_window: false,
358 rel: false
359 ]
360
361 # Import environment specific config. This must remain at the bottom
362 # of this file so it overrides the configuration defined above.
363 import_config "#{Mix.env()}.exs"