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