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