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