config.exs 5.2 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,
href's avatar
href committed
15
16
17
  strip_exif: false,
  proxy_remote: false,
  proxy_opts: [inline_content_types: true, keep_user_agent: true]
18

href's avatar
href committed
19
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
20

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

150
151
config :pleroma, :media_proxy,
  enabled: false,
href's avatar
href committed
152
153
154
155
156
  # base_url: "https://cache.pleroma.social",
  proxy_opts: [
    # inline_content_types: [] | false | true,
    # http: [:insecure]
  ]
lain's avatar
lain committed
157
158

config :pleroma, :chat, enabled: true
159

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

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

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

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

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

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