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,
27 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
28 files: "https://mdii.sakura.ne.jp"
30 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
32 config :pleroma, :uri_schemes,
50 # Configures the endpoint
51 config :pleroma, Pleroma.Web.Endpoint,
52 url: [host: "localhost"],
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
60 # Configures Elixir's Logger
61 config :logger, :console,
62 format: "$time $metadata[$level] $message\n",
63 metadata: [:request_id]
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"]
72 config :pleroma, :websub, Pleroma.Web.Websub
73 config :pleroma, :ostatus, Pleroma.Web.OStatus
74 config :pleroma, :httpoison, Pleroma.HTTP
77 with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
78 "Pleroma #{Mix.Project.config()[:version]} #{String.trim(version)}"
80 _ -> "Pleroma #{Mix.Project.config()[:version]} dev"
83 # Configures http settings, upstream proxy etc.
84 config :pleroma, :http, proxy_url: nil
86 config :pleroma, :instance,
89 email: "example@example.com",
90 description: "A Pleroma instance, an alternative fediverse server",
92 upload_limit: 16_000_000,
93 avatar_upload_limit: 2_000_000,
94 background_upload_limit: 4_000_000,
95 banner_upload_limit: 4_000_000,
96 registrations_open: true,
99 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
101 quarantined_instances: [],
102 managed_config: true,
103 allowed_post_formats: [
108 finmoji_enabled: true,
109 mrf_transparency: true
111 config :pleroma, :markup,
112 # XXX - unfortunately, inline images must be enabled by default right now, because
113 # of custom emoji. Issue #275 discusses defanging that somehow.
114 allow_inline_images: true,
115 allow_headings: false,
119 Pleroma.HTML.Transform.MediaProxy,
120 Pleroma.HTML.Scrubber.Default
123 config :pleroma, :fe,
124 theme: "pleroma-dark",
125 logo: "/static/logo.png",
127 logo_margin: "0.1em",
128 background: "/static/aurora_borealis.jpg",
129 redirect_root_no_login: "/main/all",
130 redirect_root_login: "/main/friends",
131 show_instance_panel: true,
132 scope_options_enabled: false,
133 formatting_options_enabled: false,
134 collapse_message_with_subject: false,
135 hide_post_stats: false,
136 hide_user_stats: false
138 config :pleroma, :activitypub,
140 unfollow_blocked: true,
141 outgoing_blocks: true,
142 follow_handshake_timeout: 500
144 config :pleroma, :user, deny_follow_blocked: true
146 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
148 config :pleroma, :mrf_rejectnonpublic,
149 allow_followersonly: false,
152 config :pleroma, :mrf_simple,
155 federated_timeline_removal: [],
159 config :pleroma, :media_proxy,
161 redirect_on_failure: true
163 # base_url: "https://cache.pleroma.social"
165 config :pleroma, :chat, enabled: true
167 config :ecto, json_library: Jason
169 config :phoenix, :format_encoders, json: Jason
171 config :pleroma, :gopher,
176 config :pleroma, :suggestions,
179 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
182 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
184 config :pleroma, :http_security,
187 sts_max_age: 31_536_000,
188 ct_max_age: 2_592_000,
189 referrer_policy: "same-origin"
193 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
198 "X-RateLimit-Remaining",
203 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
205 # Import environment specific config. This must remain at the bottom
206 # of this file so it overrides the configuration defined above.
207 import_config "#{Mix.env()}.exs"