Fix admin api.
[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 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
76 # Configures http settings, upstream proxy etc.
77 config :pleroma, :http, proxy_url: nil
78
79 config :pleroma, :instance,
80 name: "Pleroma",
81 email: "example@example.com",
82 description: "A Pleroma instance, an alternative fediverse server",
83 limit: 5000,
84 upload_limit: 16_000_000,
85 avatar_upload_limit: 2_000_000,
86 background_upload_limit: 4_000_000,
87 banner_upload_limit: 4_000_000,
88 registrations_open: true,
89 federating: true,
90 allow_relay: true,
91 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
92 public: true,
93 quarantined_instances: [],
94 managed_config: true,
95 allowed_post_formats: [
96 "text/plain",
97 "text/html",
98 "text/markdown"
99 ],
100 finmoji_enabled: true,
101 mrf_transparency: true
102
103 config :pleroma, :markup,
104 # XXX - unfortunately, inline images must be enabled by default right now, because
105 # of custom emoji. Issue #275 discusses defanging that somehow.
106 allow_inline_images: true,
107 allow_headings: false,
108 allow_tables: false,
109 allow_fonts: false,
110 scrub_policy: [
111 Pleroma.HTML.Transform.MediaProxy,
112 Pleroma.HTML.Scrubber.Default
113 ]
114
115 config :pleroma, :fe,
116 theme: "pleroma-dark",
117 logo: "/static/logo.png",
118 logo_mask: true,
119 logo_margin: "0.1em",
120 background: "/static/aurora_borealis.jpg",
121 redirect_root_no_login: "/main/all",
122 redirect_root_login: "/main/friends",
123 show_instance_panel: true,
124 scope_options_enabled: false,
125 formatting_options_enabled: false,
126 collapse_message_with_subject: false,
127 hide_post_stats: false,
128 hide_user_stats: false
129
130 config :pleroma, :activitypub,
131 accept_blocks: true,
132 unfollow_blocked: true,
133 outgoing_blocks: true,
134 follow_handshake_timeout: 500
135
136 config :pleroma, :user, deny_follow_blocked: true
137
138 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
139
140 config :pleroma, :mrf_rejectnonpublic,
141 allow_followersonly: false,
142 allow_direct: false
143
144 config :pleroma, :mrf_simple,
145 media_removal: [],
146 media_nsfw: [],
147 federated_timeline_removal: [],
148 reject: [],
149 accept: []
150
151 config :pleroma, :media_proxy,
152 enabled: false,
153 redirect_on_failure: true
154
155 # base_url: "https://cache.pleroma.social"
156
157 config :pleroma, :chat, enabled: true
158
159 config :ecto, json_library: Jason
160
161 config :phoenix, :format_encoders, json: Jason
162
163 config :pleroma, :gopher,
164 enabled: false,
165 ip: {0, 0, 0, 0},
166 port: 9999
167
168 config :pleroma, :suggestions,
169 enabled: false,
170 third_party_engine:
171 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
172 timeout: 300_000,
173 limit: 23,
174 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
175
176 config :pleroma, :http_security,
177 enabled: true,
178 sts: false,
179 sts_max_age: 31_536_000,
180 ct_max_age: 2_592_000,
181 referrer_policy: "same-origin"
182
183 config :cors_plug,
184 max_age: 86_400,
185 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
186 expose: [
187 "Link",
188 "X-RateLimit-Reset",
189 "X-RateLimit-Limit",
190 "X-RateLimit-Remaining",
191 "X-Request-Id",
192 "Idempotency-Key"
193 ],
194 credentials: true,
195 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
196
197 # Import environment specific config. This must remain at the bottom
198 # of this file so it overrides the configuration defined above.
199 import_config "#{Mix.env()}.exs"