Merge branch 'new-fe-options' 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 # Upload configuration
14 config :pleroma, Pleroma.Upload,
15 uploader: Pleroma.Uploaders.Local,
16 filters: [],
17 proxy_remote: false,
18 proxy_opts: []
19
20 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
21
22 config :pleroma, Pleroma.Uploaders.S3,
23 bucket: nil,
24 public_endpoint: "https://s3.amazonaws.com"
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 signing_salt: "CqaoopA2",
56 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
57 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
58 secure_cookie_flag: true
59
60 # Configures Elixir's Logger
61 config :logger, :console,
62 format: "$time $metadata[$level] $message\n",
63 metadata: [:request_id]
64
65 config :mime, :types, %{
66 "application/xml" => ["xml"],
67 "application/xrd+xml" => ["xrd+xml"],
68 "application/activity+json" => ["activity+json"],
69 "application/ld+json" => ["activity+json"]
70 }
71
72 config :pleroma, :websub, Pleroma.Web.Websub
73 config :pleroma, :ostatus, Pleroma.Web.OStatus
74 config :pleroma, :httpoison, Pleroma.HTTP
75 config :tesla, adapter: Tesla.Adapter.Hackney
76
77 # Configures http settings, upstream proxy etc.
78 config :pleroma, :http, proxy_url: nil
79
80 config :pleroma, :instance,
81 name: "Pleroma",
82 email: "example@example.com",
83 description: "A Pleroma instance, an alternative fediverse server",
84 limit: 5000,
85 upload_limit: 16_000_000,
86 avatar_upload_limit: 2_000_000,
87 background_upload_limit: 4_000_000,
88 banner_upload_limit: 4_000_000,
89 registrations_open: true,
90 federating: true,
91 allow_relay: true,
92 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
93 public: true,
94 quarantined_instances: [],
95 managed_config: true,
96 allowed_post_formats: [
97 "text/plain",
98 "text/html",
99 "text/markdown"
100 ],
101 finmoji_enabled: true,
102 mrf_transparency: true
103
104 config :pleroma, :markup,
105 # XXX - unfortunately, inline images must be enabled by default right now, because
106 # of custom emoji. Issue #275 discusses defanging that somehow.
107 allow_inline_images: true,
108 allow_headings: false,
109 allow_tables: false,
110 allow_fonts: false,
111 scrub_policy: [
112 Pleroma.HTML.Transform.MediaProxy,
113 Pleroma.HTML.Scrubber.Default
114 ]
115
116 config :pleroma, :fe,
117 theme: "pleroma-dark",
118 logo: "/static/logo.png",
119 logo_mask: true,
120 logo_margin: "0.1em",
121 background: "/static/aurora_borealis.jpg",
122 redirect_root_no_login: "/main/all",
123 redirect_root_login: "/main/friends",
124 show_instance_panel: true,
125 scope_options_enabled: false,
126 formatting_options_enabled: false,
127 collapse_message_with_subject: false,
128 hide_post_stats: false,
129 hide_user_stats: false,
130 scope_copy: true,
131 subject_line_behavior: "email",
132 always_show_subject_input: true
133
134 config :pleroma, :activitypub,
135 accept_blocks: true,
136 unfollow_blocked: true,
137 outgoing_blocks: true,
138 follow_handshake_timeout: 500
139
140 config :pleroma, :user, deny_follow_blocked: true
141
142 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
143
144 config :pleroma, :mrf_rejectnonpublic,
145 allow_followersonly: false,
146 allow_direct: false
147
148 config :pleroma, :mrf_simple,
149 media_removal: [],
150 media_nsfw: [],
151 federated_timeline_removal: [],
152 reject: [],
153 accept: []
154
155 config :pleroma, :media_proxy,
156 enabled: false,
157 # base_url: "https://cache.pleroma.social",
158 proxy_opts: [
159 # inline_content_types: [] | false | true,
160 # http: [:insecure]
161 ]
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"