32593045c237d0c82daf08d9dd27ec8d97615410
[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 method: Pleroma.Captcha.Kocaptcha
16
17 # Kocaptcha is a very simple captcha service, the source code is here: https://github.com/koto-bank/kocaptcha
18 config :pleroma, Pleroma.Captcha.Kocaptcha,
19 endpoint: "http://localhost:9093"
20
21 # Upload configuration
22 config :pleroma, Pleroma.Upload,
23 uploader: Pleroma.Uploaders.Local,
24 filters: [],
25 proxy_remote: false,
26 proxy_opts: []
27
28 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
29
30 config :pleroma, Pleroma.Uploaders.S3,
31 bucket: nil,
32 public_endpoint: "https://s3.amazonaws.com"
33
34 config :pleroma, Pleroma.Uploaders.MDII,
35 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
36 files: "https://mdii.sakura.ne.jp"
37
38 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
39
40 config :pleroma, :uri_schemes,
41 valid_schemes: [
42 "https",
43 "http",
44 "dat",
45 "dweb",
46 "gopher",
47 "ipfs",
48 "ipns",
49 "irc",
50 "ircs",
51 "magnet",
52 "mailto",
53 "mumble",
54 "ssb",
55 "xmpp"
56 ]
57
58 # Configures the endpoint
59 config :pleroma, Pleroma.Web.Endpoint,
60 url: [host: "localhost"],
61 protocol: "https",
62 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
63 signing_salt: "CqaoopA2",
64 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
65 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
66 secure_cookie_flag: true
67
68 # Configures Elixir's Logger
69 config :logger, :console,
70 format: "$time $metadata[$level] $message\n",
71 metadata: [:request_id]
72
73 config :mime, :types, %{
74 "application/xml" => ["xml"],
75 "application/xrd+xml" => ["xrd+xml"],
76 "application/activity+json" => ["activity+json"],
77 "application/ld+json" => ["activity+json"]
78 }
79
80 config :pleroma, :websub, Pleroma.Web.Websub
81 config :pleroma, :ostatus, Pleroma.Web.OStatus
82 config :pleroma, :httpoison, Pleroma.HTTP
83 config :tesla, adapter: Tesla.Adapter.Hackney
84
85 # Configures http settings, upstream proxy etc.
86 config :pleroma, :http, proxy_url: nil
87
88 config :pleroma, :instance,
89 name: "Pleroma",
90 email: "example@example.com",
91 description: "A Pleroma instance, an alternative fediverse server",
92 limit: 5000,
93 upload_limit: 16_000_000,
94 avatar_upload_limit: 2_000_000,
95 background_upload_limit: 4_000_000,
96 banner_upload_limit: 4_000_000,
97 registrations_open: true,
98 federating: true,
99 allow_relay: true,
100 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
101 public: true,
102 quarantined_instances: [],
103 managed_config: true,
104 allowed_post_formats: [
105 "text/plain",
106 "text/html",
107 "text/markdown"
108 ],
109 finmoji_enabled: true,
110 mrf_transparency: true
111
112 config :pleroma, :markup,
113 # XXX - unfortunately, inline images must be enabled by default right now, because
114 # of custom emoji. Issue #275 discusses defanging that somehow.
115 allow_inline_images: true,
116 allow_headings: false,
117 allow_tables: false,
118 allow_fonts: false,
119 scrub_policy: [
120 Pleroma.HTML.Transform.MediaProxy,
121 Pleroma.HTML.Scrubber.Default
122 ]
123
124 config :pleroma, :fe,
125 theme: "pleroma-dark",
126 logo: "/static/logo.png",
127 logo_mask: true,
128 logo_margin: "0.1em",
129 background: "/static/aurora_borealis.jpg",
130 redirect_root_no_login: "/main/all",
131 redirect_root_login: "/main/friends",
132 show_instance_panel: true,
133 scope_options_enabled: false,
134 formatting_options_enabled: false,
135 collapse_message_with_subject: false,
136 hide_post_stats: false,
137 hide_user_stats: false,
138 scope_copy: true,
139 subject_line_behavior: "email",
140 always_show_subject_input: true
141
142 config :pleroma, :activitypub,
143 accept_blocks: true,
144 unfollow_blocked: true,
145 outgoing_blocks: true,
146 follow_handshake_timeout: 500
147
148 config :pleroma, :user, deny_follow_blocked: true
149
150 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
151
152 config :pleroma, :mrf_rejectnonpublic,
153 allow_followersonly: false,
154 allow_direct: false
155
156 config :pleroma, :mrf_simple,
157 media_removal: [],
158 media_nsfw: [],
159 federated_timeline_removal: [],
160 reject: [],
161 accept: []
162
163 config :pleroma, :media_proxy,
164 enabled: false,
165 # base_url: "https://cache.pleroma.social",
166 proxy_opts: [
167 # inline_content_types: [] | false | true,
168 # http: [:insecure]
169 ]
170
171 config :pleroma, :chat, enabled: true
172
173 config :ecto, json_library: Jason
174
175 config :phoenix, :format_encoders, json: Jason
176
177 config :pleroma, :gopher,
178 enabled: false,
179 ip: {0, 0, 0, 0},
180 port: 9999
181
182 config :pleroma, :suggestions,
183 enabled: false,
184 third_party_engine:
185 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
186 timeout: 300_000,
187 limit: 23,
188 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
189
190 config :pleroma, :http_security,
191 enabled: true,
192 sts: false,
193 sts_max_age: 31_536_000,
194 ct_max_age: 2_592_000,
195 referrer_policy: "same-origin"
196
197 config :cors_plug,
198 max_age: 86_400,
199 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
200 expose: [
201 "Link",
202 "X-RateLimit-Reset",
203 "X-RateLimit-Limit",
204 "X-RateLimit-Remaining",
205 "X-Request-Id",
206 "Idempotency-Key"
207 ],
208 credentials: true,
209 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
210
211 # Import environment specific config. This must remain at the bottom
212 # of this file so it overrides the configuration defined above.
213 import_config "#{Mix.env()}.exs"