config.exs 5.12 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

gled's avatar
gled committed
13
config :pleroma, Pleroma.Upload,
Thurloat's avatar
Thurloat committed
14
  uploader: Pleroma.Uploaders.Local,
15
16
  strip_exif: false

17
18
19
config :pleroma, Pleroma.Uploaders.Local,
  uploads: "uploads",
  uploads_url: "{{base_url}}/media/{{file}}"
20

21
22
config :pleroma, Pleroma.Uploaders.S3,
  bucket: nil,
23
24
  public_endpoint: "https://s3.amazonaws.com",
  force_media_proxy: false
lain's avatar
lain committed
25

hakabahitoyo's avatar
hakabahitoyo committed
26
config :pleroma, Pleroma.Uploaders.MDII,
hakabahitoyo's avatar
hakabahitoyo committed
27
28
  cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
  files: "https://mdii.sakura.ne.jp"
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
29

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

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
config :pleroma, :uri_schemes,
  valid_schemes: [
    "https",
    "http",
    "dat",
    "dweb",
    "gopher",
    "ipfs",
    "ipns",
    "irc",
    "ircs",
    "magnet",
    "mailto",
    "mumble",
    "ssb",
    "xmpp"
  ]
49

lain's avatar
lain committed
50
51
52
# Configures the endpoint
config :pleroma, Pleroma.Web.Endpoint,
  url: [host: "localhost"],
lain's avatar
lain committed
53
  protocol: "https",
lain's avatar
lain committed
54
  secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
href's avatar
href committed
55
  signing_salt: "CqaoopA2",
lain's avatar
lain committed
56
  render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
57
58
  pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
  secure_cookie_flag: true
lain's avatar
lain committed
59
60
61
62
63
64

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

lain's avatar
lain committed
65
config :mime, :types, %{
66
  "application/xml" => ["xml"],
lain's avatar
lain committed
67
  "application/xrd+xml" => ["xrd+xml"],
lain's avatar
lain committed
68
69
  "application/activity+json" => ["activity+json"],
  "application/ld+json" => ["activity+json"]
lain's avatar
lain committed
70
71
}

lain's avatar
lain committed
72
73
config :pleroma, :websub, Pleroma.Web.Websub
config :pleroma, :ostatus, Pleroma.Web.OStatus
74
config :pleroma, :httpoison, Pleroma.HTTP
75

jeff's avatar
docs    
jeff committed
76
# Configures http settings, upstream proxy etc.
lain's avatar
lain committed
77
config :pleroma, :http, proxy_url: nil
78

lain's avatar
lain committed
79
80
config :pleroma, :instance,
  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
86
87
  avatar_upload_limit: 2_000_000,
  background_upload_limit: 4_000_000,
  banner_upload_limit: 4_000_000,
lain's avatar
lain committed
88
  registrations_open: true,
89
  federating: true,
90
  allow_relay: true,
lain's avatar
lain committed
91
  rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
92
  public: true,
93
  quarantined_instances: [],
94
95
96
97
98
  managed_config: true,
  allowed_post_formats: [
    "text/plain",
    "text/html",
    "text/markdown"
99
  ],
scarlett's avatar
scarlett committed
100
  finmoji_enabled: true,
101
  mrf_transparency: true
lain's avatar
lain committed
102

103
config :pleroma, :markup,
104
105
106
  # 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,
107
108
109
  allow_headings: false,
  allow_tables: false,
  allow_fonts: false,
110
111
112
113
  scrub_policy: [
    Pleroma.HTML.Transform.MediaProxy,
    Pleroma.HTML.Scrubber.Default
  ]
114

115
116
117
config :pleroma, :fe,
  theme: "pleroma-dark",
  logo: "/static/logo.png",
118
119
  logo_mask: true,
  logo_margin: "0.1em",
120
121
122
123
  background: "/static/aurora_borealis.jpg",
  redirect_root_no_login: "/main/all",
  redirect_root_login: "/main/friends",
  show_instance_panel: true,
124
  scope_options_enabled: false,
125
  formatting_options_enabled: false,
126
127
128
  collapse_message_with_subject: false,
  hide_post_stats: false,
  hide_user_stats: false
129

130
131
132
config :pleroma, :activitypub,
  accept_blocks: true,
  unfollow_blocked: true,
133
134
  outgoing_blocks: true,
  follow_handshake_timeout: 500
135

squidboi's avatar
squidboi committed
136
config :pleroma, :user, deny_follow_blocked: true
137

138
139
config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default

140
141
142
143
config :pleroma, :mrf_rejectnonpublic,
  allow_followersonly: false,
  allow_direct: false

144
145
146
147
config :pleroma, :mrf_simple,
  media_removal: [],
  media_nsfw: [],
  federated_timeline_removal: [],
kaniini's avatar
kaniini committed
148
149
  reject: [],
  accept: []
150

151
152
153
154
config :pleroma, :media_proxy,
  enabled: false,
  redirect_on_failure: true

lain's avatar
lain committed
155
156
157
# base_url: "https://cache.pleroma.social"

config :pleroma, :chat, enabled: true
158

lain's avatar
lain committed
159
160
config :ecto, json_library: Jason

lain's avatar
lain committed
161
config :phoenix, :format_encoders, json: Jason
lain's avatar
lain committed
162

lain's avatar
lain committed
163
164
165
166
167
config :pleroma, :gopher,
  enabled: false,
  ip: {0, 0, 0, 0},
  port: 9999

Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
168
169
170
config :pleroma, :suggestions,
  enabled: false,
  third_party_engine:
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
171
    "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
172
  timeout: 300_000,
173
  limit: 23,
Hakaba Hitoyo's avatar
Hakaba Hitoyo committed
174
  web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
hakabahitoyo's avatar
hakabahitoyo committed
175

kaniini's avatar
kaniini committed
176
config :pleroma, :http_security,
177
178
  enabled: true,
  sts: false,
179
  sts_max_age: 31_536_000,
180
181
  ct_max_age: 2_592_000,
  referrer_policy: "same-origin"
182

kaniini's avatar
kaniini committed
183
184
185
186
187
188
189
190
191
192
193
194
195
196
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
197
198
# 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
199
import_config "#{Mix.env()}.exs"