From 7bed350a23c8028d279214f1a0b1c344300af133 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 6 Aug 2018 06:18:15 +0000 Subject: config: allow relaying to be disabled --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 3a7301348..f3102aea3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -59,6 +59,7 @@ config :pleroma, :instance, upload_limit: 16_000_000, registrations_open: true, federating: true, + allow_relay: true, rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy, public: true, quarantined_instances: [] -- cgit v1.2.3 From 09cb40220336f464e63ad4f56370c284028ccc94 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 24 Aug 2018 18:03:41 +0000 Subject: fe config: add collapse_message_with_subject fe option --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 839e6bde6..08d2381b2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -76,7 +76,8 @@ config :pleroma, :fe, who_to_follow_provider: "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-osa-api.cgi?{{host}}+{{user}}", who_to_follow_link: "https://vinayaka.distsn.org/?{{host}}+{{user}}", - scope_options_enabled: false + scope_options_enabled: false, + collapse_message_with_subject: false config :pleroma, :activitypub, accept_blocks: true, -- cgit v1.2.3 From 89e2cb0828477a668c243d0cc13269677ac58cca Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Sun, 26 Aug 2018 17:21:57 +0900 Subject: remove unused settings --- config/config.exs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 08d2381b2..6b1e31398 100644 --- a/config/config.exs +++ b/config/config.exs @@ -72,10 +72,6 @@ config :pleroma, :fe, redirect_root_no_login: "/main/all", redirect_root_login: "/main/friends", show_instance_panel: true, - show_who_to_follow_panel: false, - who_to_follow_provider: - "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-osa-api.cgi?{{host}}+{{user}}", - who_to_follow_link: "https://vinayaka.distsn.org/?{{host}}+{{user}}", scope_options_enabled: false, collapse_message_with_subject: false -- cgit v1.2.3 From b9a642da1ec290386d04245eb17175866e40308c Mon Sep 17 00:00:00 2001 From: shibayashi Date: Tue, 28 Aug 2018 00:40:58 +0200 Subject: Add Secure and SameSite cookie flags --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index eaf20e8f9..d5e28f586 100644 --- a/config/config.exs +++ b/config/config.exs @@ -24,7 +24,8 @@ config :pleroma, Pleroma.Web.Endpoint, protocol: "https", secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl", render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)], - pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2] + pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2], + secure_cookie_flag: true # Configures Elixir's Logger config :logger, :console, -- cgit v1.2.3 From e95d958b525cd0a448d38753099bbf7a4f30ba90 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 27 Aug 2018 23:30:53 +0000 Subject: sample config: show how amazon s3 support is activated, including third-party clones like wasabi --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index eaf20e8f9..d234d23eb 100644 --- a/config/config.exs +++ b/config/config.exs @@ -12,7 +12,9 @@ config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes config :pleroma, Pleroma.Upload, uploads: "uploads", - strip_exif: false + strip_exif: false, + use_s3: false, + s3_bucket: nil config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -- cgit v1.2.3 From 709816a0f891d6c26c43b54577a3b727c1fe4af6 Mon Sep 17 00:00:00 2001 From: Thurloat Date: Mon, 27 Aug 2018 22:20:54 -0300 Subject: example of flexible storage backends --- config/config.exs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index d234d23eb..4eb59994c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -11,9 +11,13 @@ config :pleroma, ecto_repos: [Pleroma.Repo] config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes config :pleroma, Pleroma.Upload, - uploads: "uploads", - strip_exif: false, - use_s3: false, + uploader: Pleroma.Uploaders.Local + strip_exif: false + +config :pleroma, Pleroma.Uploaders.Local, + uploads: "uploads" + +config :pleroma, Pleroma.Uploaders.S3, s3_bucket: nil config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -- cgit v1.2.3 From 0df558a6a5f5a5f64de57c91074981429da08764 Mon Sep 17 00:00:00 2001 From: Thurloat Date: Mon, 27 Aug 2018 22:45:53 -0300 Subject: cleaning up a bit. --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 4eb59994c..fe4bfe8a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -11,7 +11,7 @@ config :pleroma, ecto_repos: [Pleroma.Repo] config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes config :pleroma, Pleroma.Upload, - uploader: Pleroma.Uploaders.Local + uploader: Pleroma.Uploaders.Local, strip_exif: false config :pleroma, Pleroma.Uploaders.Local, -- cgit v1.2.3 From 8d2d7a8859754ab4beffcc43a87218631b07f378 Mon Sep 17 00:00:00 2001 From: Thurloat Date: Tue, 28 Aug 2018 09:57:41 -0300 Subject: Implement uploader behaviour run formatter <# --- config/config.exs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index fe4bfe8a0..fa36209ac 100644 --- a/config/config.exs +++ b/config/config.exs @@ -14,11 +14,9 @@ config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, strip_exif: false -config :pleroma, Pleroma.Uploaders.Local, - uploads: "uploads" +config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" -config :pleroma, Pleroma.Uploaders.S3, - s3_bucket: nil +config :pleroma, Pleroma.Uploaders.S3, s3_bucket: nil config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -- cgit v1.2.3 From 856b5e1ca4d84e097cb78dbf34cf9861faa25e5e Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 31 Aug 2018 04:01:21 +0000 Subject: config: chase pleroma-fe updates from MR pleroma-fe!324. --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index fa36209ac..20b55086c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -73,6 +73,8 @@ config :pleroma, :instance, config :pleroma, :fe, theme: "pleroma-dark", logo: "/static/logo.png", + logo_mask: true, + logo_margin: "0.1em", background: "/static/aurora_borealis.jpg", redirect_root_no_login: "/main/all", redirect_root_login: "/main/friends", -- cgit v1.2.3 From de5bd6fc65d478b9d3ff9b6f875cb20cc2e411d9 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 31 Aug 2018 04:43:15 +0000 Subject: config: fix up defaults for s3 endpoint configuration --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 20b55086c..e22363519 100644 --- a/config/config.exs +++ b/config/config.exs @@ -16,7 +16,9 @@ config :pleroma, Pleroma.Upload, config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" -config :pleroma, Pleroma.Uploaders.S3, s3_bucket: nil +config :pleroma, Pleroma.Uploaders.S3, + bucket: nil, + public_endpoint: "https://s3.amazonaws.com" config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -- cgit v1.2.3 From c921d998988a0a1b38f10027e66bd06fbcd568e6 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 1 Sep 2018 21:03:35 +0000 Subject: config: add ability to disable Pleroma FE config management (closes #276) --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e22363519..b29300c3c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -70,7 +70,8 @@ config :pleroma, :instance, allow_relay: true, rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy, public: true, - quarantined_instances: [] + quarantined_instances: [], + managed_config: true config :pleroma, :fe, theme: "pleroma-dark", -- cgit v1.2.3 From 754deb26dd7ad9bf431d6d3edc3004b4f27ca8b0 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 1 Sep 2018 17:14:14 +0200 Subject: [Pleroma.Uploaders.Local]: Add configuration for custom url path One use-case being an external caching proxy --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b29300c3c..3dd8ef284 100644 --- a/config/config.exs +++ b/config/config.exs @@ -14,7 +14,9 @@ config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, strip_exif: false -config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" +config :pleroma, Pleroma.Uploaders.Local, + uploads: "uploads", + uploads_url: "{{base_url}}/media/{{file}}" config :pleroma, Pleroma.Uploaders.S3, bucket: nil, -- cgit v1.2.3 From 4e1bb7bccb196f26c55f6d3764e0066f81e92bd4 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Sun, 9 Sep 2018 13:57:23 +0900 Subject: make limit for /api/v1/suggestions --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index d88a56adf..ed718c3d3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -128,6 +128,7 @@ config :pleroma, :suggestions, third_party_engine: "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}", timeout: 300_000, + limit: 23, web: "https://vinayaka.distsn.org/?{{host}}+{{user}}" # Import environment specific config. This must remain at the bottom -- cgit v1.2.3 From 255f46d7ab124d86a71e994deffca5f4f438b49b Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 9 Sep 2018 23:29:00 +0000 Subject: html: new module providing a configurable markup scrubbing policy --- config/config.exs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ed718c3d3..559a12a91 100644 --- a/config/config.exs +++ b/config/config.exs @@ -76,6 +76,9 @@ config :pleroma, :instance, quarantined_instances: [], managed_config: true +config :pleroma, :markup, + scrub_policy: HtmlSanitizeEx.Scrubber.BasicHTML + config :pleroma, :fe, theme: "pleroma-dark", logo: "/static/logo.png", -- cgit v1.2.3 From 40e2f6e50034e81c3bf509e9dc9f2c938d86445d Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 10 Sep 2018 00:05:26 +0000 Subject: html: add default scrubbing profile and configuration knobs --- config/config.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 559a12a91..b3889ba12 100644 --- a/config/config.exs +++ b/config/config.exs @@ -77,7 +77,11 @@ config :pleroma, :instance, managed_config: true config :pleroma, :markup, - scrub_policy: HtmlSanitizeEx.Scrubber.BasicHTML + allow_inline_images: false, + allow_headings: false, + allow_tables: false, + allow_fonts: false, + scrub_policy: Pleroma.HTML.Scrubber.Default config :pleroma, :fe, theme: "pleroma-dark", -- cgit v1.2.3 From 358f88e10a7d3de0481309287b4b756087490dfc Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 10 Sep 2018 00:23:23 +0000 Subject: html: allow inline images by default (because of custom emoji) --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b3889ba12..d5c5b7902 100644 --- a/config/config.exs +++ b/config/config.exs @@ -77,7 +77,9 @@ config :pleroma, :instance, managed_config: true config :pleroma, :markup, - allow_inline_images: false, + # 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, allow_headings: false, allow_tables: false, allow_fonts: false, -- cgit v1.2.3 From 342ed844464bd32f633959b5fd48711c29c01566 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 10 Sep 2018 00:48:28 +0000 Subject: MRF: add policy for normalizing HTML markup (local and remote) to a specific policy --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index d5c5b7902..d8edc4862 100644 --- a/config/config.exs +++ b/config/config.exs @@ -104,6 +104,8 @@ config :pleroma, :activitypub, config :pleroma, :user, deny_follow_blocked: true +config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default + config :pleroma, :mrf_rejectnonpublic, allow_followersonly: false, allow_direct: false -- cgit v1.2.3 From 5acfa2e0919f459beae6ada55d087db8a74949e1 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 16 Sep 2018 02:13:54 +0000 Subject: config: pass inline images through mediaproxy (closes #275) --- config/config.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index d8edc4862..2290119f7 100644 --- a/config/config.exs +++ b/config/config.exs @@ -83,7 +83,10 @@ config :pleroma, :markup, allow_headings: false, allow_tables: false, allow_fonts: false, - scrub_policy: Pleroma.HTML.Scrubber.Default + scrub_policy: [ + Pleroma.HTML.Transform.MediaProxy, + Pleroma.HTML.Scrubber.Default + ] config :pleroma, :fe, theme: "pleroma-dark", -- cgit v1.2.3 From 16307da3115a840163be149c3847fc600b260bc6 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 9 Sep 2018 12:12:31 +0000 Subject: twitterapi: frontend config: add formattingOptionsEnabled --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2290119f7..c3094eb2b 100644 --- a/config/config.exs +++ b/config/config.exs @@ -98,6 +98,7 @@ config :pleroma, :fe, redirect_root_login: "/main/friends", show_instance_panel: true, scope_options_enabled: false, + formatting_options_enabled: false, collapse_message_with_subject: false config :pleroma, :activitypub, -- cgit v1.2.3 From 285ac80c36cbd943b16eb5e1ee4447376f8f555f Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 5 Oct 2018 21:02:17 +0000 Subject: config: allow for accepted post formats to be configured --- config/config.exs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c3094eb2b..608c035b0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -74,7 +74,12 @@ config :pleroma, :instance, rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy, public: true, quarantined_instances: [], - managed_config: true + managed_config: true, + allowed_post_formats: [ + "text/plain", + "text/html", + "text/markdown" + ] config :pleroma, :markup, # XXX - unfortunately, inline images must be enabled by default right now, because -- cgit v1.2.3 From 7b3fff9af87bbf8e6b0cc824b7ebf681e4a614f1 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 7 Oct 2018 01:05:59 +0000 Subject: {mastodon api, twitter api}: make the follow handshake timeout configurable --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 608c035b0..c32ac9da2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -109,7 +109,8 @@ config :pleroma, :fe, config :pleroma, :activitypub, accept_blocks: true, unfollow_blocked: true, - outgoing_blocks: true + outgoing_blocks: true, + follow_handshake_timeout: 500 config :pleroma, :user, deny_follow_blocked: true -- cgit v1.2.3 From 08d5ad71b68e44334911c63aada418fab2c17df2 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 7 Oct 2018 01:23:38 +0000 Subject: nodeinfo: allow opting out of MRF transparency --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index c32ac9da2..320296991 100644 --- a/config/config.exs +++ b/config/config.exs @@ -79,7 +79,8 @@ config :pleroma, :instance, "text/plain", "text/html", "text/markdown" - ] + ], + mrf_transparency: true config :pleroma, :markup, # XXX - unfortunately, inline images must be enabled by default right now, because -- cgit v1.2.3 From 2154c5dcd891cf2a85c0251e07424b5681aa88a2 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 18 Oct 2018 07:36:58 +0200 Subject: lib/pleroma/html.ex: Use macros for valid_schemes, change config for schemes --- config/config.exs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 320296991..e5f0b4f6f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -24,7 +24,23 @@ config :pleroma, Pleroma.Uploaders.S3, config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -config :pleroma, :uri_schemes, additionnal_schemes: [] +config :pleroma, :uri_schemes, + valid_schemes: [ + "https", + "http", + "dat", + "dweb", + "gopher", + "ipfs", + "ipns", + "irc", + "ircs", + "magnet", + "mailto", + "mumble", + "ssb", + "xmpp" + ] # Configures the endpoint config :pleroma, Pleroma.Web.Endpoint, -- cgit v1.2.3 From 3e79d941c81e741c1268523db23a9024ca67bd29 Mon Sep 17 00:00:00 2001 From: scarlett Date: Sun, 21 Oct 2018 12:54:37 +0100 Subject: Defaults for new frontend options in config.exs --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e5f0b4f6f..225ca914a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -121,7 +121,9 @@ config :pleroma, :fe, show_instance_panel: true, scope_options_enabled: false, formatting_options_enabled: false, - collapse_message_with_subject: false + collapse_message_with_subject: false, + hide_post_stats: false, + hide_user_stats: false config :pleroma, :activitypub, accept_blocks: true, -- cgit v1.2.3 From ae5beb7b6464d9bc4532693987d9d94cd5bac6bd Mon Sep 17 00:00:00 2001 From: scarlett Date: Thu, 25 Oct 2018 17:58:46 +0100 Subject: Make finmoji optional --- config/config.exs | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 225ca914a..2d2cdda45 100644 --- a/config/config.exs +++ b/config/config.exs @@ -96,6 +96,7 @@ config :pleroma, :instance, "text/html", "text/markdown" ], + finmoji_enabled: true, mrf_transparency: true config :pleroma, :markup, -- cgit v1.2.3 From 167d3789a5a334859dfb9bf1612bdfc993032667 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 29 Oct 2018 16:30:12 +0000 Subject: activitypub: upload: pass through an upload limit if one is provided --- config/config.exs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2d2cdda45..3abb6e695 100644 --- a/config/config.exs +++ b/config/config.exs @@ -84,6 +84,9 @@ config :pleroma, :instance, description: "A Pleroma instance, an alternative fediverse server", limit: 5000, upload_limit: 16_000_000, + avatar_upload_limit: 2_000_000, + background_upload_limit: 4_000_000, + banner_upload_limit: 4_000_000, registrations_open: true, federating: true, allow_relay: true, -- cgit v1.2.3 From 36825932eb04d9db3e2d24b02368d7dd709dea23 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 29 Oct 2018 18:00:59 +0000 Subject: s3 uploader: add new feature to force public attachment URIs to go through media proxy --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2d2cdda45..a71fedf1c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -20,7 +20,8 @@ config :pleroma, Pleroma.Uploaders.Local, config :pleroma, Pleroma.Uploaders.S3, bucket: nil, - public_endpoint: "https://s3.amazonaws.com" + public_endpoint: "https://s3.amazonaws.com", + force_media_proxy: false config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -- cgit v1.2.3 From ee41dbeca5e57f013a924625d641801b849f432d Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 2 Nov 2018 10:13:29 +0100 Subject: config/config.md: Create --- config/config.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 config/config.md (limited to 'config') diff --git a/config/config.md b/config/config.md new file mode 100644 index 000000000..b75ff2aa8 --- /dev/null +++ b/config/config.md @@ -0,0 +1,32 @@ +# Configuration + +## Pleroma.Upload +* `uploader`: Select which `Pleroma.Uploaders` to use +* `strip_exif`: boolean, uses ImageMagick(!) to strip exif. + +## Pleroma.Uploaders.Local +* `uploads``: Which directory to store the user-uploads in, relative to pleroma’s working directory +* `uploads_url`: The URL to access a user-uploaded file, ``{{base_url}}`` is replaced to the instance URL and ``{{file}}`` to the filename. Useful when you want to proxy the media files via another host. + +## ``:uri_schemes`` +* `valid_schemes`: List of the scheme part that is considered valid to be an URL + +## ``:instance`` +* ``name`` +* ``email``: Email used to reach an Administrator/Moderator of the instance +* ``description`` +* ``limit``: Posts character limit +* ``upload_limit``: File size limit of uploads (except for avatar, background, banner) +* ``avatar_upload_limit``: File size limit of user’s profile avatars +* ``background_upload_limit``: File size limit of user’s profile backgrounds +* ``banner_upload_limit``: File size limit of user’s profile backgrounds +* ``registerations_open`` +* ``federating`` +* ``allow_relay`` +* ``rewrite_policy``: Message Rewrite Policy, either one or a list. +* ``public`` +* ``quarantined_instances``: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. +* ``managed_config``: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` +* ``allowed_post_formats``: MIME-type list of formats allowed to be posted (transformed into HTML) +* ``finmoji_enabled`` +* ``mrf_transparency``: Make the content of your Message Rewrite Facility settings public (via nodeinfo). -- cgit v1.2.3 From 0189ccd4d9651396fcfd7a3959c5353acd0785c6 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 2 Nov 2018 10:32:43 +0100 Subject: config/config.md: Complete it [WIP] --- config/config.md | 73 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 21 deletions(-) (limited to 'config') diff --git a/config/config.md b/config/config.md index b75ff2aa8..3c3f69282 100644 --- a/config/config.md +++ b/config/config.md @@ -5,28 +5,59 @@ * `strip_exif`: boolean, uses ImageMagick(!) to strip exif. ## Pleroma.Uploaders.Local -* `uploads``: Which directory to store the user-uploads in, relative to pleroma’s working directory +* `uploads`: Which directory to store the user-uploads in, relative to pleroma’s working directory * `uploads_url`: The URL to access a user-uploaded file, ``{{base_url}}`` is replaced to the instance URL and ``{{file}}`` to the filename. Useful when you want to proxy the media files via another host. -## ``:uri_schemes`` +## :uri_schemes * `valid_schemes`: List of the scheme part that is considered valid to be an URL -## ``:instance`` -* ``name`` -* ``email``: Email used to reach an Administrator/Moderator of the instance -* ``description`` -* ``limit``: Posts character limit -* ``upload_limit``: File size limit of uploads (except for avatar, background, banner) -* ``avatar_upload_limit``: File size limit of user’s profile avatars -* ``background_upload_limit``: File size limit of user’s profile backgrounds -* ``banner_upload_limit``: File size limit of user’s profile backgrounds -* ``registerations_open`` -* ``federating`` -* ``allow_relay`` -* ``rewrite_policy``: Message Rewrite Policy, either one or a list. -* ``public`` -* ``quarantined_instances``: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. -* ``managed_config``: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` -* ``allowed_post_formats``: MIME-type list of formats allowed to be posted (transformed into HTML) -* ``finmoji_enabled`` -* ``mrf_transparency``: Make the content of your Message Rewrite Facility settings public (via nodeinfo). +## :instance +* `name` +* `email`: Email used to reach an Administrator/Moderator of the instance +* `description` +* `limit`: Posts character limit +* `upload_limit`: File size limit of uploads (except for avatar, background, banner) +* `avatar_upload_limit`: File size limit of user’s profile avatars +* `background_upload_limit`: File size limit of user’s profile backgrounds +* `banner_upload_limit`: File size limit of user’s profile backgrounds +* `registerations_open` +* `federating` +* `allow_relay` +* `rewrite_policy`: Message Rewrite Policy, either one or a list. +* `public` +* `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. +* `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` +* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML) +* `finmoji_enabled` +* `mrf_transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo). + +## :fe +* `theme` +* `logo` +* `logo_mask` +* `logo_margin` +* `background` +* `redirect_root_no_login` +* `redirect_root_login` +* `show_instance_panel` +* `scope_options_enabled`: Enable setting an notice visibility when posting +* `formatting_options_enabled`: Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to ``:instance, allowed_post_formats`` +* `collapse_message_with_subjects`: When a message has a subject(aka Content Warning), collapse it by default +* `hide_post_stats`: Hide notices statistics(repeats, favorites, …) +* `hide_user_stats`: Hide profile statistics(posts, posts per day, followers, followings, …) + +## :mrf_simple +* `media_removal`: List of instances to remove medias from +* `media_nsfw`: List of instances to put medias as NSFW(sensitive) from +* `federated_timeline_removal`: List of instances to remove from Federated (aka The Whole Known Network) Timeline +* `reject`: List of instances to reject any activities from +* `accept`: List of instances to accept any activities from + +## :media_proxy +* `enabled`: Enables proxying of remote media to the instance’s proxy +* `redirect_on_failure`: Use the original URL when Media Proxy fails to get it + +## :gopher +* `enabled`: Enables the gopher interface +* `ip`: IP address to bind to +* `port`: Port to bind to -- cgit v1.2.3 From 79bdc3db1932955314815d57f8c4a40b3744fa0b Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 8 Nov 2018 14:27:21 +0100 Subject: config/config.md: Fill all the blanks --- config/config.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'config') diff --git a/config/config.md b/config/config.md index 3c3f69282..75cb4f683 100644 --- a/config/config.md +++ b/config/config.md @@ -12,34 +12,36 @@ * `valid_schemes`: List of the scheme part that is considered valid to be an URL ## :instance -* `name` +* `name`: The instance’s name * `email`: Email used to reach an Administrator/Moderator of the instance -* `description` -* `limit`: Posts character limit +* `description`: The instance’s description, can be seen in nodeinfo and ``/api/v1/instance`` +* `limit`: Posts character limit (CW/Subject included in the counter) * `upload_limit`: File size limit of uploads (except for avatar, background, banner) * `avatar_upload_limit`: File size limit of user’s profile avatars * `background_upload_limit`: File size limit of user’s profile backgrounds * `banner_upload_limit`: File size limit of user’s profile backgrounds -* `registerations_open` +* `registerations_open`: Enable registerations for anyone, invitations can be used when false. * `federating` -* `allow_relay` +* `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance * `rewrite_policy`: Message Rewrite Policy, either one or a list. -* `public` +* `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. * `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` * `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML) -* `finmoji_enabled` +* `finmoji_enabled`: Whenether to enable the finmojis in the custom emojis. * `mrf_transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo). ## :fe -* `theme` -* `logo` -* `logo_mask` -* `logo_margin` -* `background` -* `redirect_root_no_login` -* `redirect_root_login` -* `show_instance_panel` +This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:instance`` is set to false. + +* `theme`: Which theme to use, they are defined in ``styles.json`` +* `logo`: URL of the logo, defaults to Pleroma’s logo +* `logo_mask`: Whenether to mask the logo +* `logo_margin`: What margin to use around the logo +* `background`: URL of the background, unless viewing a user profile with a background that is set +* `redirect_root_no_login`: relative URL which indicates where to redirect when a user isn’t logged in. +* `redirect_root_login`: relative URL which indicates where to redirect when a user is logged in. +* `show_instance_panel`: Whenether to show the instance’s specific panel. * `scope_options_enabled`: Enable setting an notice visibility when posting * `formatting_options_enabled`: Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to ``:instance, allowed_post_formats`` * `collapse_message_with_subjects`: When a message has a subject(aka Content Warning), collapse it by default -- cgit v1.2.3 From db67c9b118542dc0010cee5589c1e8ba97d61a1b Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 8 Nov 2018 14:33:05 +0100 Subject: config/config.md: scope_options_enabled also addresses subject --- config/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.md b/config/config.md index 75cb4f683..bbcea619f 100644 --- a/config/config.md +++ b/config/config.md @@ -42,7 +42,7 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * `redirect_root_no_login`: relative URL which indicates where to redirect when a user isn’t logged in. * `redirect_root_login`: relative URL which indicates where to redirect when a user is logged in. * `show_instance_panel`: Whenether to show the instance’s specific panel. -* `scope_options_enabled`: Enable setting an notice visibility when posting +* `scope_options_enabled`: Enable setting an notice visibility and subject/CW when posting * `formatting_options_enabled`: Enable setting a formatting different than plain-text (ie. HTML, Markdown) when posting, relates to ``:instance, allowed_post_formats`` * `collapse_message_with_subjects`: When a message has a subject(aka Content Warning), collapse it by default * `hide_post_stats`: Hide notices statistics(repeats, favorites, …) -- cgit v1.2.3 From d1a7a9fd24403600851cb541a2021d32b7cc8fc5 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 8 Nov 2018 14:59:44 +0100 Subject: config/config.md: Add lines inspired/copied from CONFIGURATION.md --- config/config.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.md b/config/config.md index bbcea619f..51172fc4d 100644 --- a/config/config.md +++ b/config/config.md @@ -1,5 +1,8 @@ # Configuration +This file describe the configuration, it is recommended to edit the relevant *.secret.exs file instead of the others founds in the ``config`` directory. +If you run Pleroma with ``MIX_ENV=prod`` the file is ``prod.secret.exs``, otherwise it is ``dev.secret.exs``. + ## Pleroma.Upload * `uploader`: Select which `Pleroma.Uploaders` to use * `strip_exif`: boolean, uses ImageMagick(!) to strip exif. @@ -23,7 +26,11 @@ * `registerations_open`: Enable registerations for anyone, invitations can be used when false. * `federating` * `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance -* `rewrite_policy`: Message Rewrite Policy, either one or a list. +* `rewrite_policy`: Message Rewrite Policy, either one or a list. Here are the ones available by default: + * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`: Doesn’t modify activities (default) + * `Pleroma.Web.ActivityPub.MRF.DropPolicy`: Drops all activities. It generally doesn’t makes sense to use in production + * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`: Restrict the visibility of activities from certains instances (See ``:mrf_simple`` section) + * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See ``:mrf_rejectnonpublic`` section) * `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. * `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` @@ -55,6 +62,10 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * `reject`: List of instances to reject any activities from * `accept`: List of instances to accept any activities from +## :mrf_rejectnonpublic +* `allow_followersonly`: whether to allow followers-only posts +* `allow_direct`: whether to allow direct messages + ## :media_proxy * `enabled`: Enables proxying of remote media to the instance’s proxy * `redirect_on_failure`: Use the original URL when Media Proxy fails to get it @@ -63,3 +74,9 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * `enabled`: Enables the gopher interface * `ip`: IP address to bind to * `port`: Port to bind to + +## :activitypub +* ``accept_blocks``: Whether to accept incoming block activities from other instances +* ``unfollow_blocked``: Whether blocks result in people getting unfollowed +* ``outgoing_blocks``: Whether to federate blocks to other instances +* ``deny_follow_blocked``: Whether to disallow following an account that has blocked the user in question -- cgit v1.2.3 From 234e471289e7556b0a9f70a01ceefc5814396f9f Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 11 Nov 2018 05:40:55 +0000 Subject: config: properly configure CORSPlug. --- config/config.exs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index a6be69620..e82c490e3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -176,6 +176,20 @@ config :pleroma, :suggestions, limit: 23, web: "https://vinayaka.distsn.org/?{{host}}+{{user}}" +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"] + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" -- cgit v1.2.3 From 69f5dfcfb3f2b498e1f9957244f0896b6f9d5c2a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 11 Nov 2018 06:37:18 +0000 Subject: config: add default parameters for CSPPlug --- config/config.exs | 5 +++++ config/config.md | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e82c490e3..ad8653025 100644 --- a/config/config.exs +++ b/config/config.exs @@ -176,6 +176,11 @@ config :pleroma, :suggestions, limit: 23, web: "https://vinayaka.distsn.org/?{{host}}+{{user}}" +config :pleroma, :csp, + enabled: true, + sts: false, + sts_max_age: 31_536_000 + config :cors_plug, max_age: 86_400, methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"], diff --git a/config/config.md b/config/config.md index 51172fc4d..e08d206b6 100644 --- a/config/config.md +++ b/config/config.md @@ -80,3 +80,8 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * ``unfollow_blocked``: Whether blocks result in people getting unfollowed * ``outgoing_blocks``: Whether to federate blocks to other instances * ``deny_follow_blocked``: Whether to disallow following an account that has blocked the user in question + +## :csp +* ``enabled``: Whether the managed content security policy is enabled +* ``sts``: Whether to additionally send a `Strict-Transport-Security` header +* ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent -- cgit v1.2.3 From df72978dce3805157537e8fa1a2fec35fcf9a7cd Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 11 Nov 2018 06:53:42 +0000 Subject: csp plug: add support for certificate transparency --- config/config.exs | 3 ++- config/config.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ad8653025..1d918919d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -179,7 +179,8 @@ config :pleroma, :suggestions, config :pleroma, :csp, enabled: true, sts: false, - sts_max_age: 31_536_000 + sts_max_age: 31_536_000, + ct_max_age: 2_592_000 config :cors_plug, max_age: 86_400, diff --git a/config/config.md b/config/config.md index e08d206b6..34f703560 100644 --- a/config/config.md +++ b/config/config.md @@ -85,3 +85,4 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * ``enabled``: Whether the managed content security policy is enabled * ``sts``: Whether to additionally send a `Strict-Transport-Security` header * ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent +* ``ct_max_age``: The maximum age for the `Except-CT` header if sent -- cgit v1.2.3 From 5dda13ee5f9302cfef215c8ffaa527e9a572a37b Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 11 Nov 2018 07:27:36 +0000 Subject: config docs: typo fix --- config/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.md b/config/config.md index 34f703560..446b0ce67 100644 --- a/config/config.md +++ b/config/config.md @@ -85,4 +85,4 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * ``enabled``: Whether the managed content security policy is enabled * ``sts``: Whether to additionally send a `Strict-Transport-Security` header * ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent -* ``ct_max_age``: The maximum age for the `Except-CT` header if sent +* ``ct_max_age``: The maximum age for the `Expect-CT` header if sent -- cgit v1.2.3 From fe67665e19cc98faff4a8ee53a3f4ca4190ca2ef Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 12 Nov 2018 15:08:02 +0000 Subject: rename CSPPlug to HTTPSecurityPlug. --- config/config.exs | 2 +- config/config.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 1d918919d..be9c03ceb 100644 --- a/config/config.exs +++ b/config/config.exs @@ -176,7 +176,7 @@ config :pleroma, :suggestions, limit: 23, web: "https://vinayaka.distsn.org/?{{host}}+{{user}}" -config :pleroma, :csp, +config :pleroma, :http_security, enabled: true, sts: false, sts_max_age: 31_536_000, diff --git a/config/config.md b/config/config.md index 446b0ce67..48af1c236 100644 --- a/config/config.md +++ b/config/config.md @@ -81,7 +81,7 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * ``outgoing_blocks``: Whether to federate blocks to other instances * ``deny_follow_blocked``: Whether to disallow following an account that has blocked the user in question -## :csp +## :http_security * ``enabled``: Whether the managed content security policy is enabled * ``sts``: Whether to additionally send a `Strict-Transport-Security` header * ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent -- cgit v1.2.3 From ee5932a504d69e591aad7bdd52bd97d1f92d4e32 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 12 Nov 2018 15:14:46 +0000 Subject: http security: allow referrer-policy to be configured --- config/config.exs | 3 ++- config/config.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index be9c03ceb..9cc558564 100644 --- a/config/config.exs +++ b/config/config.exs @@ -180,7 +180,8 @@ config :pleroma, :http_security, enabled: true, sts: false, sts_max_age: 31_536_000, - ct_max_age: 2_592_000 + ct_max_age: 2_592_000, + referrer_policy: "same-origin" config :cors_plug, max_age: 86_400, diff --git a/config/config.md b/config/config.md index 48af1c236..5b4110646 100644 --- a/config/config.md +++ b/config/config.md @@ -86,3 +86,4 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * ``sts``: Whether to additionally send a `Strict-Transport-Security` header * ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent * ``ct_max_age``: The maximum age for the `Expect-CT` header if sent +* ``referrer_policy``: The referrer policy to use, either `"same-origin"` or `"no-referrer"`. -- cgit v1.2.3 From 58af0787be605d0b382b30aba3749c7c8bbf10bc Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Thu, 15 Nov 2018 14:19:10 +0900 Subject: add mdii uploader --- config/config.exs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 9cc558564..ef69368e6 100644 --- a/config/config.exs +++ b/config/config.exs @@ -23,6 +23,9 @@ config :pleroma, Pleroma.Uploaders.S3, public_endpoint: "https://s3.amazonaws.com", force_media_proxy: false +config :pleroma, Pleroma.Uploaders.Mdii, + host_name: "mdii.sakura.ne.jp" + config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] config :pleroma, :uri_schemes, -- cgit v1.2.3 From 8e707aba29921666a50878c39751cd53ee5cde7e Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Thu, 15 Nov 2018 15:11:59 +0900 Subject: format --- config/config.exs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ef69368e6..f222c1aa4 100644 --- a/config/config.exs +++ b/config/config.exs @@ -23,8 +23,7 @@ config :pleroma, Pleroma.Uploaders.S3, public_endpoint: "https://s3.amazonaws.com", force_media_proxy: false -config :pleroma, Pleroma.Uploaders.Mdii, - host_name: "mdii.sakura.ne.jp" +config :pleroma, Pleroma.Uploaders.Mdii, host_name: "mdii.sakura.ne.jp" config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -- cgit v1.2.3 From 55abd8482ed604587ffa9f5f3f64d36d4d5aa296 Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Fri, 16 Nov 2018 20:41:12 +0900 Subject: better config --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index f222c1aa4..8ce443f9e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -23,7 +23,9 @@ config :pleroma, Pleroma.Uploaders.S3, public_endpoint: "https://s3.amazonaws.com", force_media_proxy: false -config :pleroma, Pleroma.Uploaders.Mdii, host_name: "mdii.sakura.ne.jp" +config :pleroma, Pleroma.Uploaders.Mdii, + cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi", + files: "https://mdii.sakura.ne.jp" config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"] -- cgit v1.2.3 From 8fd0556c78472f8bdeee3520d6192ce96339d545 Mon Sep 17 00:00:00 2001 From: hakabahitoyo Date: Sat, 17 Nov 2018 18:14:42 +0900 Subject: better config reading --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 8ce443f9e..af0fdca9a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -23,7 +23,7 @@ config :pleroma, Pleroma.Uploaders.S3, public_endpoint: "https://s3.amazonaws.com", force_media_proxy: false -config :pleroma, Pleroma.Uploaders.Mdii, +config :pleroma, Pleroma.Uploaders.MDII, cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi", files: "https://mdii.sakura.ne.jp" -- cgit v1.2.3 From bcecdc3ab194135d5bc17496b8091a6c17775c87 Mon Sep 17 00:00:00 2001 From: href Date: Fri, 16 Nov 2018 21:35:08 +0100 Subject: Various runtime configuration fixes --- config/config.exs | 1 + config/prod.exs | 1 + 2 files changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index af0fdca9a..faeac8ed1 100644 --- a/config/config.exs +++ b/config/config.exs @@ -52,6 +52,7 @@ config :pleroma, Pleroma.Web.Endpoint, url: [host: "localhost"], protocol: "https", secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl", + signing_salt: "CqaoopA2", render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)], pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2], secure_cookie_flag: true diff --git a/config/prod.exs b/config/prod.exs index d0cfd1ac2..e5e5a977e 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -14,6 +14,7 @@ use Mix.Config # manifest is generated by the mix phoenix.digest task # which you typically run after static files are built. config :pleroma, Pleroma.Web.Endpoint, + server: true, http: [port: 4000], protocol: "http" -- cgit v1.2.3 From bc5cf2c1926225a43589abf330fe984ea439cb00 Mon Sep 17 00:00:00 2001 From: href Date: Tue, 20 Nov 2018 17:55:03 +0100 Subject: Improved version string --- config/config.exs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index af0fdca9a..ac841d907 100644 --- a/config/config.exs +++ b/config/config.exs @@ -72,18 +72,10 @@ config :pleroma, :websub, Pleroma.Web.Websub config :pleroma, :ostatus, Pleroma.Web.OStatus config :pleroma, :httpoison, Pleroma.HTTP -version = - with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do - "Pleroma #{Mix.Project.config()[:version]} #{String.trim(version)}" - else - _ -> "Pleroma #{Mix.Project.config()[:version]} dev" - end - # Configures http settings, upstream proxy etc. config :pleroma, :http, proxy_url: nil config :pleroma, :instance, - version: version, name: "Pleroma", email: "example@example.com", description: "A Pleroma instance, an alternative fediverse server", -- cgit v1.2.3 From 6979eeda34a7c9c201c0816f322c3a29c6d947e6 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 26 Nov 2018 23:54:46 +0000 Subject: config: document mrf_user_allowlist --- config/config.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'config') diff --git a/config/config.md b/config/config.md index 5b4110646..c843bca5d 100644 --- a/config/config.md +++ b/config/config.md @@ -87,3 +87,16 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i * ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent * ``ct_max_age``: The maximum age for the `Expect-CT` header if sent * ``referrer_policy``: The referrer policy to use, either `"same-origin"` or `"no-referrer"`. + +## :mrf_user_allowlist + +The keys in this section are the domain names that the policy should apply to. +Each key should be assigned a list of users that should be allowed through by +their ActivityPub ID. + +An example: + +``` +config :pleroma, :mrf_user_allowlist, + "example.org": ["https://example.org/users/admin"] +``` -- cgit v1.2.3 From 761ed2355fceccbc267af3d8e0784b07c288819e Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 30 Nov 2018 03:05:34 +0100 Subject: config/prod.exs: Remove server: true This breaks mix tasks in regular Elixir --- config/prod.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/prod.exs b/config/prod.exs index e5e5a977e..d0cfd1ac2 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -14,7 +14,6 @@ use Mix.Config # manifest is generated by the mix phoenix.digest task # which you typically run after static files are built. config :pleroma, Pleroma.Web.Endpoint, - server: true, http: [port: 4000], protocol: "http" -- cgit v1.2.3 From b19597f602e70121a1762476873377c782549817 Mon Sep 17 00:00:00 2001 From: href Date: Fri, 23 Nov 2018 17:40:45 +0100 Subject: reverse proxy / uploads --- config/config.exs | 19 ++++++++++--------- config/test.exs | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 848c9d6cf..ee43071ea 100644 --- a/config/config.exs +++ b/config/config.exs @@ -12,16 +12,15 @@ config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, - strip_exif: false + strip_exif: false, + proxy_remote: false, + proxy_opts: [inline_content_types: true, keep_user_agent: true] -config :pleroma, Pleroma.Uploaders.Local, - uploads: "uploads", - uploads_url: "{{base_url}}/media/{{file}}" +config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" config :pleroma, Pleroma.Uploaders.S3, bucket: nil, - public_endpoint: "https://s3.amazonaws.com", - force_media_proxy: false + public_endpoint: "https://s3.amazonaws.com" config :pleroma, Pleroma.Uploaders.MDII, cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi", @@ -150,9 +149,11 @@ config :pleroma, :mrf_simple, config :pleroma, :media_proxy, enabled: false, - redirect_on_failure: true - -# base_url: "https://cache.pleroma.social" + # base_url: "https://cache.pleroma.social", + proxy_opts: [ + # inline_content_types: [] | false | true, + # http: [:insecure] + ] config :pleroma, :chat, enabled: true diff --git a/config/test.exs b/config/test.exs index 1bd11dee4..3aaed1b2c 100644 --- a/config/test.exs +++ b/config/test.exs @@ -9,7 +9,7 @@ config :pleroma, Pleroma.Web.Endpoint, # Print only warnings and errors during test config :logger, level: :warn -config :pleroma, Pleroma.Upload, uploads: "test/uploads" +config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads" # Configure your database config :pleroma, Pleroma.Repo, -- cgit v1.2.3 From 02d3dc6869f388388ea744ea4ee3b54279d55e86 Mon Sep 17 00:00:00 2001 From: href Date: Thu, 29 Nov 2018 21:11:45 +0100 Subject: Uploads fun, part. 2 --- config/config.exs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ee43071ea..d7869464e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -10,11 +10,19 @@ config :pleroma, ecto_repos: [Pleroma.Repo] config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes +# Upload configuration config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, - strip_exif: false, + # filters: [Pleroma.Upload.DedupeFilter, Pleroma.Upload.MogrifyFilter], + filters: [], proxy_remote: false, - proxy_opts: [inline_content_types: true, keep_user_agent: true] + proxy_opts: [] + +# Strip Exif +# Also put Pleroma.Upload.MogrifyFilter in the `filters` list of Pleroma.Upload configuration. +# config :pleroma, Pleroma.Upload.MogrifyFilter, +# args: "strip" +# Pleroma.Upload.MogrifyFilter: [args: "strip"] config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" -- cgit v1.2.3 From 680716b3c9c5d8fa655d27ffdf40461a6f8b4b9c Mon Sep 17 00:00:00 2001 From: href Date: Fri, 30 Nov 2018 17:44:42 +0100 Subject: Config docs --- config/config.exs | 7 ------- config/config.md | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index d7869464e..12f47389c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -13,17 +13,10 @@ config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes # Upload configuration config :pleroma, Pleroma.Upload, uploader: Pleroma.Uploaders.Local, - # filters: [Pleroma.Upload.DedupeFilter, Pleroma.Upload.MogrifyFilter], filters: [], proxy_remote: false, proxy_opts: [] -# Strip Exif -# Also put Pleroma.Upload.MogrifyFilter in the `filters` list of Pleroma.Upload configuration. -# config :pleroma, Pleroma.Upload.MogrifyFilter, -# args: "strip" -# Pleroma.Upload.MogrifyFilter: [args: "strip"] - config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" config :pleroma, Pleroma.Uploaders.S3, diff --git a/config/config.md b/config/config.md index c843bca5d..47e838dd6 100644 --- a/config/config.md +++ b/config/config.md @@ -5,11 +5,19 @@ If you run Pleroma with ``MIX_ENV=prod`` the file is ``prod.secret.exs``, otherw ## Pleroma.Upload * `uploader`: Select which `Pleroma.Uploaders` to use -* `strip_exif`: boolean, uses ImageMagick(!) to strip exif. +* `filters`: List of `Pleroma.Upload.Filter` to use. +* `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host. +* `proxy_remote`: If you're using a remote uploader, Pleroma will proxy media requests instead of redirecting to it. +* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation. + +Note: `strip_exif` has been replaced by `Pleroma.Upload.Filter.Mogrify`. ## Pleroma.Uploaders.Local * `uploads`: Which directory to store the user-uploads in, relative to pleroma’s working directory -* `uploads_url`: The URL to access a user-uploaded file, ``{{base_url}}`` is replaced to the instance URL and ``{{file}}`` to the filename. Useful when you want to proxy the media files via another host. + +## Pleroma.Upload.Filter.Mogrify + +* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", {"impode", "1"}]`. ## :uri_schemes * `valid_schemes`: List of the scheme part that is considered valid to be an URL @@ -68,7 +76,8 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i ## :media_proxy * `enabled`: Enables proxying of remote media to the instance’s proxy -* `redirect_on_failure`: Use the original URL when Media Proxy fails to get it +* `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts. +* `proxy_opts`: All options defined in `Pleroma.ReverseProxy` documentation, defaults to `[max_body_length: (25*1_048_576)]`. ## :gopher * `enabled`: Enables the gopher interface -- cgit v1.2.3