Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/pinned...
[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, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
19
20 # Upload configuration
21 config :pleroma, Pleroma.Upload,
22 uploader: Pleroma.Uploaders.Local,
23 filters: [],
24 proxy_remote: false,
25 proxy_opts: []
26
27 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
28
29 config :pleroma, Pleroma.Uploaders.S3,
30 bucket: nil,
31 public_endpoint: "https://s3.amazonaws.com"
32
33 config :pleroma, Pleroma.Uploaders.MDII,
34 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
35 files: "https://mdii.sakura.ne.jp"
36
37 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
38
39 config :pleroma, :uri_schemes,
40 valid_schemes: [
41 "https",
42 "http",
43 "dat",
44 "dweb",
45 "gopher",
46 "ipfs",
47 "ipns",
48 "irc",
49 "ircs",
50 "magnet",
51 "mailto",
52 "mumble",
53 "ssb",
54 "xmpp"
55 ]
56
57 websocket_config = [
58 path: "/websocket",
59 serializer: [
60 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
61 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
62 ],
63 timeout: 60_000,
64 transport_log: false,
65 compress: false
66 ]
67
68 # Configures the endpoint
69 config :pleroma, Pleroma.Web.Endpoint,
70 url: [host: "localhost"],
71 http: [
72 dispatch: [
73 {:_,
74 [
75 {"/api/v1/streaming", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []},
76 {"/socket/websocket", Phoenix.Endpoint.CowboyWebSocket,
77 {nil, {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
78 {:_, Plug.Adapters.Cowboy.Handler, {Pleroma.Web.Endpoint, []}}
79 ]}
80 ]
81 ],
82 protocol: "https",
83 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
84 signing_salt: "CqaoopA2",
85 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
86 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
87 secure_cookie_flag: true
88
89 # Configures Elixir's Logger
90 config :logger, :console,
91 format: "$time $metadata[$level] $message\n",
92 metadata: [:request_id]
93
94 config :logger, :ex_syslogger,
95 level: :debug,
96 ident: "Pleroma",
97 format: "$date $time $metadata[$level] $message",
98 metadata: [:request_id]
99
100 config :mime, :types, %{
101 "application/xml" => ["xml"],
102 "application/xrd+xml" => ["xrd+xml"],
103 "application/jrd+json" => ["jrd+json"],
104 "application/activity+json" => ["activity+json"],
105 "application/ld+json" => ["activity+json"]
106 }
107
108 config :pleroma, :websub, Pleroma.Web.Websub
109 config :pleroma, :ostatus, Pleroma.Web.OStatus
110 config :pleroma, :httpoison, Pleroma.HTTP
111 config :tesla, adapter: Tesla.Adapter.Hackney
112
113 # Configures http settings, upstream proxy etc.
114 config :pleroma, :http, proxy_url: nil
115
116 config :pleroma, :instance,
117 name: "Pleroma",
118 email: "example@example.com",
119 description: "A Pleroma instance, an alternative fediverse server",
120 limit: 5_000,
121 remote_limit: 100_000,
122 upload_limit: 16_000_000,
123 avatar_upload_limit: 2_000_000,
124 background_upload_limit: 4_000_000,
125 banner_upload_limit: 4_000_000,
126 registrations_open: true,
127 federating: true,
128 allow_relay: true,
129 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
130 public: true,
131 quarantined_instances: [],
132 managed_config: true,
133 static_dir: "instance/static/",
134 allowed_post_formats: [
135 "text/plain",
136 "text/html",
137 "text/markdown"
138 ],
139 finmoji_enabled: true,
140 mrf_transparency: true,
141 autofollowed_nicknames: []
142
143 config :pleroma, :markup,
144 # XXX - unfortunately, inline images must be enabled by default right now, because
145 # of custom emoji. Issue #275 discusses defanging that somehow.
146 allow_inline_images: true,
147 allow_headings: false,
148 allow_tables: false,
149 allow_fonts: false,
150 scrub_policy: [
151 Pleroma.HTML.Transform.MediaProxy,
152 Pleroma.HTML.Scrubber.Default
153 ]
154
155 config :pleroma, :fe,
156 theme: "pleroma-dark",
157 logo: "/static/logo.png",
158 logo_mask: true,
159 logo_margin: "0.1em",
160 background: "/static/aurora_borealis.jpg",
161 redirect_root_no_login: "/main/all",
162 redirect_root_login: "/main/friends",
163 show_instance_panel: true,
164 scope_options_enabled: false,
165 formatting_options_enabled: false,
166 collapse_message_with_subject: false,
167 hide_post_stats: false,
168 hide_user_stats: false,
169 scope_copy: true,
170 subject_line_behavior: "email",
171 always_show_subject_input: true
172
173 config :pleroma, :activitypub,
174 accept_blocks: true,
175 unfollow_blocked: true,
176 outgoing_blocks: true,
177 follow_handshake_timeout: 500
178
179 config :pleroma, :user, deny_follow_blocked: true
180
181 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
182
183 config :pleroma, :mrf_rejectnonpublic,
184 allow_followersonly: false,
185 allow_direct: false
186
187 config :pleroma, :mrf_hellthread, threshold: 10
188
189 config :pleroma, :mrf_simple,
190 media_removal: [],
191 media_nsfw: [],
192 federated_timeline_removal: [],
193 reject: [],
194 accept: []
195
196 config :pleroma, :media_proxy, enabled: false
197
198 config :pleroma, :chat, enabled: true
199
200 config :ecto, json_library: Jason
201
202 config :phoenix, :format_encoders, json: Jason
203
204 config :pleroma, :gopher,
205 enabled: false,
206 ip: {0, 0, 0, 0},
207 port: 9999
208
209 config :pleroma, :suggestions,
210 enabled: false,
211 third_party_engine:
212 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
213 timeout: 300_000,
214 limit: 23,
215 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
216
217 config :pleroma, :http_security,
218 enabled: true,
219 sts: false,
220 sts_max_age: 31_536_000,
221 ct_max_age: 2_592_000,
222 referrer_policy: "same-origin"
223
224 config :cors_plug,
225 max_age: 86_400,
226 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
227 expose: [
228 "Link",
229 "X-RateLimit-Reset",
230 "X-RateLimit-Limit",
231 "X-RateLimit-Remaining",
232 "X-Request-Id",
233 "Idempotency-Key"
234 ],
235 credentials: true,
236 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
237
238 config :pleroma, Pleroma.User,
239 restricted_nicknames: [
240 "about",
241 "~",
242 "main",
243 "users",
244 "settings",
245 "objects",
246 "activities",
247 "web",
248 "registration",
249 "friend-requests",
250 "pleroma",
251 "api",
252 "tag",
253 "notice",
254 "status",
255 "user-search",
256 "ostatus_subscribe",
257 "oauth",
258 "push",
259 "relay",
260 "inbox",
261 ".well-known",
262 "nodeinfo",
263 "auth",
264 "proxy",
265 "dev",
266 "internal",
267 "media"
268 ]
269
270 config :pleroma, Pleroma.Web.Federator, max_jobs: 50
271
272 config :pleroma, Pleroma.Web.Federator.RetryQueue,
273 enabled: false,
274 max_jobs: 20,
275 initial_timeout: 30,
276 max_retries: 5
277
278 # Import environment specific config. This must remain at the bottom
279 # of this file so it overrides the configuration defined above.
280 import_config "#{Mix.env()}.exs"