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