config.exs 6.32 KB
Newer Older
lain's avatar
lain committed
1
2
3
4
5
6
7
8
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config

# General application configuration
lain's avatar
lain committed
9
config :pleroma, ecto_repos: [Pleroma.Repo]
lain's avatar
lain committed
10

lain's avatar
lain committed
11
config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
lain's avatar
lain committed
12

13
config :pleroma, Pleroma.Captcha,
vaartis's avatar
vaartis committed
14
  enabled: false,
15
  seconds_retained: 180,
16
17
  method: Pleroma.Captcha.Kocaptcha

18
config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
19

href's avatar
href committed
20
# Upload configuration
gled's avatar
gled committed
21
config :pleroma, Pleroma.Upload,
Thurloat's avatar
Thurloat committed
22
  uploader: Pleroma.Uploaders.Local,
href's avatar
href committed
23
  filters: [],
href's avatar
href committed
24
  proxy_remote: false,
href's avatar
href committed
25
26
  proxy_opts: []

href's avatar
href committed
27
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
28

29
30
config :pleroma, Pleroma.Uploaders.S3,
  bucket: nil,
href's avatar
href committed
31
  public_endpoint: "https://s3.amazonaws.com"
lain's avatar
lain committed
32

hakabahitoyo's avatar
hakabahitoyo committed
33
config :pleroma, Pleroma.Uploaders.MDII,
hakabahitoyo's avatar
hakabahitoyo committed
34
35
  cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
  files: "https://mdii.sakura.ne.jp"
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
36

Jorty's avatar
Jorty committed
37
config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
Jorty's avatar
Jorty committed
38

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
config :pleroma, :uri_schemes,
  valid_schemes: [
    "https",
    "http",
    "dat",
    "dweb",
    "gopher",
    "ipfs",
    "ipns",
    "irc",
    "ircs",
    "magnet",
    "mailto",
    "mumble",
    "ssb",
    "xmpp"
  ]
56

lain's avatar
lain committed
57
58
59
# Configures the endpoint
config :pleroma, Pleroma.Web.Endpoint,
  url: [host: "localhost"],
href's avatar
href committed
60
61
62
63
64
65
66
67
68
  http: [
    dispatch: [
      {:_,
       [
         {"/api/v1/streaming", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []},
         {:_, Plug.Adapters.Cowboy.Handler, {Pleroma.Web.Endpoint, []}}
       ]}
    ]
  ],
lain's avatar
lain committed
69
  protocol: "https",
lain's avatar
lain committed
70
  secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
href's avatar
href committed
71
  signing_salt: "CqaoopA2",
lain's avatar
lain committed
72
  render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
73
74
  pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
  secure_cookie_flag: true
lain's avatar
lain committed
75
76
77
78
79
80

# Configures Elixir's Logger
config :logger, :console,
  format: "$time $metadata[$level] $message\n",
  metadata: [:request_id]

lain's avatar
lain committed
81
config :mime, :types, %{
82
  "application/xml" => ["xml"],
lain's avatar
lain committed
83
  "application/xrd+xml" => ["xrd+xml"],
84
  "application/jrd+json" => ["jrd+json"],
lain's avatar
lain committed
85
86
  "application/activity+json" => ["activity+json"],
  "application/ld+json" => ["activity+json"]
lain's avatar
lain committed
87
88
}

lain's avatar
lain committed
89
90
config :pleroma, :websub, Pleroma.Web.Websub
config :pleroma, :ostatus, Pleroma.Web.OStatus
91
config :pleroma, :httpoison, Pleroma.HTTP
92
config :tesla, adapter: Tesla.Adapter.Hackney
93

jeff's avatar
docs    
jeff committed
94
# Configures http settings, upstream proxy etc.
lain's avatar
lain committed
95
config :pleroma, :http, proxy_url: nil
96

lain's avatar
lain committed
97
98
config :pleroma, :instance,
  name: "Pleroma",
99
  email: "example@example.com",
100
  description: "A Pleroma instance, an alternative fediverse server",
101
  limit: 5_000,
lain's avatar
lain committed
102
  remote_limit: 100_000,
103
  upload_limit: 16_000_000,
104
105
106
  avatar_upload_limit: 2_000_000,
  background_upload_limit: 4_000_000,
  banner_upload_limit: 4_000_000,
lain's avatar
lain committed
107
  registrations_open: true,
108
  federating: true,
109
  allow_relay: true,
lain's avatar
lain committed
110
  rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
111
  public: true,
112
  quarantined_instances: [],
113
  managed_config: true,
href's avatar
href committed
114
  static_dir: "instance/static/",
115
116
117
118
  allowed_post_formats: [
    "text/plain",
    "text/html",
    "text/markdown"
119
  ],
scarlett's avatar
scarlett committed
120
  finmoji_enabled: true,
121
  mrf_transparency: true
lain's avatar
lain committed
122

123
config :pleroma, :markup,
124
125
126
  # XXX - unfortunately, inline images must be enabled by default right now, because
  # of custom emoji.  Issue #275 discusses defanging that somehow.
  allow_inline_images: true,
127
128
129
  allow_headings: false,
  allow_tables: false,
  allow_fonts: false,
130
131
132
133
  scrub_policy: [
    Pleroma.HTML.Transform.MediaProxy,
    Pleroma.HTML.Scrubber.Default
  ]
134

135
136
137
config :pleroma, :fe,
  theme: "pleroma-dark",
  logo: "/static/logo.png",
138
139
  logo_mask: true,
  logo_margin: "0.1em",
140
  background: "/static/aurora_borealis.jpg",
lain's avatar
lain committed
141
142
  redirect_root_no_login: "/main/all",
  redirect_root_login: "/main/friends",
143
  show_instance_panel: true,
144
  scope_options_enabled: false,
145
  formatting_options_enabled: false,
146
147
  collapse_message_with_subject: false,
  hide_post_stats: false,
148
149
150
151
  hide_user_stats: false,
  scope_copy: true,
  subject_line_behavior: "email",
  always_show_subject_input: true
152

153
154
155
config :pleroma, :activitypub,
  accept_blocks: true,
  unfollow_blocked: true,
156
157
  outgoing_blocks: true,
  follow_handshake_timeout: 500
158

squidboi's avatar
squidboi committed
159
config :pleroma, :user, deny_follow_blocked: true
160

161
162
config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default

163
164
165
166
config :pleroma, :mrf_rejectnonpublic,
  allow_followersonly: false,
  allow_direct: false

Karen Konou's avatar
Karen Konou committed
167
config :pleroma, :mrf_hellthread, threshold: 10
Karen Konou's avatar
Karen Konou committed
168

169
170
171
172
config :pleroma, :mrf_simple,
  media_removal: [],
  media_nsfw: [],
  federated_timeline_removal: [],
kaniini's avatar
kaniini committed
173
174
  reject: [],
  accept: []
175

176
177
config :pleroma, :media_proxy,
  enabled: false,
href's avatar
href committed
178
179
180
181
182
  # base_url: "https://cache.pleroma.social",
  proxy_opts: [
    # inline_content_types: [] | false | true,
    # http: [:insecure]
  ]
lain's avatar
lain committed
183
184

config :pleroma, :chat, enabled: true
185

lain's avatar
lain committed
186
187
config :ecto, json_library: Jason

lain's avatar
lain committed
188
config :phoenix, :format_encoders, json: Jason
lain's avatar
lain committed
189

lain's avatar
lain committed
190
191
192
193
194
config :pleroma, :gopher,
  enabled: false,
  ip: {0, 0, 0, 0},
  port: 9999

Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
195
196
197
config :pleroma, :suggestions,
  enabled: false,
  third_party_engine:
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
198
    "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
199
  timeout: 300_000,
200
  limit: 23,
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
201
  web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
hakabahitoyo's avatar
hakabahitoyo committed
202

kaniini's avatar
kaniini committed
203
config :pleroma, :http_security,
204
205
  enabled: true,
  sts: false,
206
  sts_max_age: 31_536_000,
207
208
  ct_max_age: 2_592_000,
  referrer_policy: "same-origin"
209

kaniini's avatar
kaniini committed
210
211
212
213
214
215
216
217
218
219
220
221
222
223
config :cors_plug,
  max_age: 86_400,
  methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
  expose: [
    "Link",
    "X-RateLimit-Reset",
    "X-RateLimit-Limit",
    "X-RateLimit-Remaining",
    "X-Request-Id",
    "Idempotency-Key"
  ],
  credentials: true,
  headers: ["Authorization", "Content-Type", "Idempotency-Key"]

lain's avatar
lain committed
224
225
config :pleroma, Pleroma.User,
  restricted_nicknames: [
lain's avatar
lain committed
226
    "about",
lain's avatar
lain committed
227
    "~",
lain's avatar
lain committed
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
    "main",
    "users",
    "settings",
    "objects",
    "activities",
    "web",
    "registration",
    "friend-requests",
    "pleroma",
    "api",
    "tag",
    "notice",
    "status",
    "user-search",
    "ostatus_subscribe",
    "oauth",
    "push",
    "relay",
    "inbox",
    ".well-known",
    "nodeinfo",
    "auth",
    "proxy",
    "dev",
Rin Toshaka's avatar
Rin Toshaka committed
252
253
    "internal",
    "media"
lain's avatar
lain committed
254
255
  ]

lain's avatar
lain committed
256
257
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
lain's avatar
lain committed
258
import_config "#{Mix.env()}.exs"