1 # This file is responsible for configuring your application
2 # and its dependencies with the aid of the Mix.Config module.
4 # This configuration file is loaded before any dependency and
5 # is restricted to this project.
8 # General application configuration
9 config :pleroma, ecto_repos: [Pleroma.Repo]
11 config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
13 config :pleroma, Pleroma.Upload,
14 uploader: Pleroma.Uploaders.Local,
17 config :pleroma, Pleroma.Uploaders.Local,
19 uploads_url: "{{base_url}}/media/{{file}}"
21 config :pleroma, Pleroma.Uploaders.S3,
23 public_endpoint: "https://s3.amazonaws.com",
24 force_media_proxy: false
26 config :pleroma, Pleroma.Uploaders.Mdii, host_name: "mdii.sakura.ne.jp"
28 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
30 config :pleroma, :uri_schemes,
48 # Configures the endpoint
49 config :pleroma, Pleroma.Web.Endpoint,
50 url: [host: "localhost"],
52 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
53 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
54 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
55 secure_cookie_flag: true
57 # Configures Elixir's Logger
58 config :logger, :console,
59 format: "$time $metadata[$level] $message\n",
60 metadata: [:request_id]
62 config :mime, :types, %{
63 "application/xml" => ["xml"],
64 "application/xrd+xml" => ["xrd+xml"],
65 "application/activity+json" => ["activity+json"],
66 "application/ld+json" => ["activity+json"]
69 config :pleroma, :websub, Pleroma.Web.Websub
70 config :pleroma, :ostatus, Pleroma.Web.OStatus
71 config :pleroma, :httpoison, Pleroma.HTTP
74 with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
75 "Pleroma #{Mix.Project.config()[:version]} #{String.trim(version)}"
77 _ -> "Pleroma #{Mix.Project.config()[:version]} dev"
80 # Configures http settings, upstream proxy etc.
81 config :pleroma, :http, proxy_url: nil
83 config :pleroma, :instance,
86 email: "example@example.com",
87 description: "A Pleroma instance, an alternative fediverse server",
89 upload_limit: 16_000_000,
90 avatar_upload_limit: 2_000_000,
91 background_upload_limit: 4_000_000,
92 banner_upload_limit: 4_000_000,
93 registrations_open: true,
96 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
98 quarantined_instances: [],
100 allowed_post_formats: [
105 finmoji_enabled: true,
106 mrf_transparency: true
108 config :pleroma, :markup,
109 # XXX - unfortunately, inline images must be enabled by default right now, because
110 # of custom emoji. Issue #275 discusses defanging that somehow.
111 allow_inline_images: true,
112 allow_headings: false,
116 Pleroma.HTML.Transform.MediaProxy,
117 Pleroma.HTML.Scrubber.Default
120 config :pleroma, :fe,
121 theme: "pleroma-dark",
122 logo: "/static/logo.png",
124 logo_margin: "0.1em",
125 background: "/static/aurora_borealis.jpg",
126 redirect_root_no_login: "/main/all",
127 redirect_root_login: "/main/friends",
128 show_instance_panel: true,
129 scope_options_enabled: false,
130 formatting_options_enabled: false,
131 collapse_message_with_subject: false,
132 hide_post_stats: false,
133 hide_user_stats: false
135 config :pleroma, :activitypub,
137 unfollow_blocked: true,
138 outgoing_blocks: true,
139 follow_handshake_timeout: 500
141 config :pleroma, :user, deny_follow_blocked: true
143 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
145 config :pleroma, :mrf_rejectnonpublic,
146 allow_followersonly: false,
149 config :pleroma, :mrf_simple,
152 federated_timeline_removal: [],
156 config :pleroma, :media_proxy,
158 redirect_on_failure: true
160 # base_url: "https://cache.pleroma.social"
162 config :pleroma, :chat, enabled: true
164 config :ecto, json_library: Jason
166 config :phoenix, :format_encoders, json: Jason
168 config :pleroma, :gopher,
173 config :pleroma, :suggestions,
176 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
179 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
181 config :pleroma, :http_security,
184 sts_max_age: 31_536_000,
185 ct_max_age: 2_592_000,
186 referrer_policy: "same-origin"
190 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
195 "X-RateLimit-Remaining",
200 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
202 # Import environment specific config. This must remain at the bottom
203 # of this file so it overrides the configuration defined above.
204 import_config "#{Mix.env()}.exs"