Reports
[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", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []},
97 {"/socket/websocket", Phoenix.Endpoint.CowboyWebSocket,
98 {nil, {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
99 {:_, Plug.Adapters.Cowboy.Handler, {Pleroma.Web.Endpoint, []}}
100 ]}
101 ]
102 ],
103 protocol: "https",
104 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
105 signing_salt: "CqaoopA2",
106 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
107 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
108 secure_cookie_flag: true
109
110 # Configures Elixir's Logger
111 config :logger, :console,
112 format: "$time $metadata[$level] $message\n",
113 metadata: [:request_id]
114
115 config :logger, :ex_syslogger,
116 level: :debug,
117 ident: "Pleroma",
118 format: "$metadata[$level] $message",
119 metadata: [:request_id]
120
121 config :mime, :types, %{
122 "application/xml" => ["xml"],
123 "application/xrd+xml" => ["xrd+xml"],
124 "application/jrd+json" => ["jrd+json"],
125 "application/activity+json" => ["activity+json"],
126 "application/ld+json" => ["activity+json"]
127 }
128
129 config :pleroma, :websub, Pleroma.Web.Websub
130 config :pleroma, :ostatus, Pleroma.Web.OStatus
131 config :pleroma, :httpoison, Pleroma.HTTP
132 config :tesla, adapter: Tesla.Adapter.Hackney
133
134 # Configures http settings, upstream proxy etc.
135 config :pleroma, :http, proxy_url: nil
136
137 config :pleroma, :instance,
138 name: "Pleroma",
139 email: "example@example.com",
140 description: "A Pleroma instance, an alternative fediverse server",
141 limit: 5_000,
142 remote_limit: 100_000,
143 upload_limit: 16_000_000,
144 avatar_upload_limit: 2_000_000,
145 background_upload_limit: 4_000_000,
146 banner_upload_limit: 4_000_000,
147 registrations_open: true,
148 federating: true,
149 federation_reachability_timeout_days: 7,
150 allow_relay: true,
151 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
152 public: true,
153 quarantined_instances: [],
154 managed_config: true,
155 static_dir: "instance/static/",
156 allowed_post_formats: [
157 "text/plain",
158 "text/html",
159 "text/markdown"
160 ],
161 finmoji_enabled: true,
162 mrf_transparency: true,
163 autofollowed_nicknames: [],
164 max_pinned_statuses: 1,
165 no_attachment_links: false,
166 welcome_user_nickname: nil,
167 welcome_message: nil,
168 max_report_comment_size: 1000
169
170 config :pleroma, :markup,
171 # XXX - unfortunately, inline images must be enabled by default right now, because
172 # of custom emoji. Issue #275 discusses defanging that somehow.
173 allow_inline_images: true,
174 allow_headings: false,
175 allow_tables: false,
176 allow_fonts: false,
177 scrub_policy: [
178 Pleroma.HTML.Transform.MediaProxy,
179 Pleroma.HTML.Scrubber.Default
180 ]
181
182 # Deprecated, will be gone in 1.0
183 config :pleroma, :fe,
184 theme: "pleroma-dark",
185 logo: "/static/logo.png",
186 logo_mask: true,
187 logo_margin: "0.1em",
188 background: "/static/aurora_borealis.jpg",
189 redirect_root_no_login: "/main/all",
190 redirect_root_login: "/main/friends",
191 show_instance_panel: true,
192 scope_options_enabled: false,
193 formatting_options_enabled: false,
194 collapse_message_with_subject: false,
195 hide_post_stats: false,
196 hide_user_stats: false,
197 scope_copy: true,
198 subject_line_behavior: "email",
199 always_show_subject_input: true
200
201 config :pleroma, :frontend_configurations,
202 pleroma_fe: %{
203 theme: "pleroma-dark",
204 logo: "/static/logo.png",
205 background: "/images/city.jpg",
206 redirectRootNoLogin: "/main/all",
207 redirectRootLogin: "/main/friends",
208 showInstanceSpecificPanel: true,
209 scopeOptionsEnabled: false,
210 formattingOptionsEnabled: false,
211 collapseMessageWithSubject: false,
212 hidePostStats: false,
213 hideUserStats: false,
214 scopeCopy: true,
215 subjectLineBehavior: "email",
216 alwaysShowSubjectInput: true
217 }
218
219 config :pleroma, :activitypub,
220 accept_blocks: true,
221 unfollow_blocked: true,
222 outgoing_blocks: true,
223 follow_handshake_timeout: 500
224
225 config :pleroma, :user, deny_follow_blocked: true
226
227 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
228
229 config :pleroma, :mrf_rejectnonpublic,
230 allow_followersonly: false,
231 allow_direct: false
232
233 config :pleroma, :mrf_hellthread,
234 delist_threshold: 10,
235 reject_threshold: 20
236
237 config :pleroma, :mrf_simple,
238 media_removal: [],
239 media_nsfw: [],
240 federated_timeline_removal: [],
241 reject: [],
242 accept: []
243
244 config :pleroma, :mrf_keyword,
245 reject: [],
246 federated_timeline_removal: [],
247 replace: []
248
249 config :pleroma, :rich_media, enabled: true
250
251 config :pleroma, :media_proxy,
252 enabled: false,
253 proxy_opts: [
254 redirect_on_failure: false,
255 max_body_length: 25 * 1_048_576,
256 http: [
257 follow_redirect: true,
258 pool: :media
259 ]
260 ]
261
262 config :pleroma, :chat, enabled: true
263
264 config :ecto, json_library: Jason
265
266 config :phoenix, :format_encoders, json: Jason
267
268 config :pleroma, :gopher,
269 enabled: false,
270 ip: {0, 0, 0, 0},
271 port: 9999
272
273 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
274
275 config :pleroma, :suggestions,
276 enabled: false,
277 third_party_engine:
278 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
279 timeout: 300_000,
280 limit: 23,
281 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
282
283 config :pleroma, :http_security,
284 enabled: true,
285 sts: false,
286 sts_max_age: 31_536_000,
287 ct_max_age: 2_592_000,
288 referrer_policy: "same-origin"
289
290 config :cors_plug,
291 max_age: 86_400,
292 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
293 expose: [
294 "Link",
295 "X-RateLimit-Reset",
296 "X-RateLimit-Limit",
297 "X-RateLimit-Remaining",
298 "X-Request-Id",
299 "Idempotency-Key"
300 ],
301 credentials: true,
302 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
303
304 config :pleroma, Pleroma.User,
305 restricted_nicknames: [
306 ".well-known",
307 "~",
308 "about",
309 "activities",
310 "api",
311 "auth",
312 "dev",
313 "friend-requests",
314 "inbox",
315 "internal",
316 "main",
317 "media",
318 "nodeinfo",
319 "notice",
320 "oauth",
321 "objects",
322 "ostatus_subscribe",
323 "pleroma",
324 "proxy",
325 "push",
326 "registration",
327 "relay",
328 "settings",
329 "status",
330 "tag",
331 "user-search",
332 "users",
333 "web"
334 ]
335
336 config :pleroma, Pleroma.Web.Federator.RetryQueue,
337 enabled: false,
338 max_jobs: 20,
339 initial_timeout: 30,
340 max_retries: 5
341
342 config :pleroma, Pleroma.Jobs,
343 federator_incoming: [max_jobs: 50],
344 federator_outgoing: [max_jobs: 50],
345 mailer: [max_jobs: 10]
346
347 # Import environment specific config. This must remain at the bottom
348 # of this file so it overrides the configuration defined above.
349 import_config "#{Mix.env()}.exs"