aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-05-21 16:23:57 -0500
committerMark Felder <feld@FreeBSD.org>2020-05-21 16:23:57 -0500
commit3771db97b4bdc5bf1161a1086e89cf14296328fb (patch)
treedc61e4d124c702cb185e620221a3f76d7b3509f7
parente0d1a942a6e561a889615f6387ce3c340dadfa21 (diff)
downloadpleroma-3771db97b4bdc5bf1161a1086e89cf14296328fb.tar.gz
Add MediaProxy invalidation settings to description.exs
-rw-r--r--config/description.exs62
1 files changed, 62 insertions, 0 deletions
diff --git a/config/description.exs b/config/description.exs
index cf7cc297a..5873aba7e 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -1633,6 +1633,31 @@ config :pleroma, :config_description, [
suggestions: ["https://example.com"]
},
%{
+ key: :invalidation,
+ type: :keyword,
+ description: "Cache invalidation for MediaProxy",
+ suggestions: [
+ enabled: false,
+ provider: Pleroma.Web.MediaProxy.Invalidation.Script
+ ],
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enable cache invalidation when object is deleted."
+ },
+ %{
+ key: :provider,
+ type: {:dropdown, :atom},
+ suggestions: [
+ "Pleroma.Web.MediaProxy.Invalidation.Http",
+ "Pleroma.Web.MediaProxy.Invalidation.Script"
+ ],
+ description: "Invalidate cached objects via HTTP or a custom script."
+ }
+ ]
+ },
+ %{
key: :proxy_opts,
type: :keyword,
description: "Options for Pleroma.ReverseProxy",
@@ -1706,6 +1731,43 @@ config :pleroma, :config_description, [
},
%{
group: :pleroma,
+ key: Pleroma.Web.MediaProxy.Invalidation.Http,
+ type: :group,
+ description: "MediaProxy Cache Invalidation Http Settings",
+ children: [
+ %{
+ key: :method,
+ type: :string,
+ description: "HTTP method for invalidation requests.",
+ suggestions: ["purge"]
+ },
+ %{
+ key: :headers,
+ type: :string,
+ description: "Additional HTTP headers for invalidation requests."
+ },
+ %{
+ key: :options,
+ type: :string,
+ description: "Additional HTTP request options for invalidation requests."
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.MediaProxy.Invalidation.Script,
+ type: :group,
+ description: "MediaProxy Cache Invalidation Script Settings",
+ children: [
+ %{
+ key: :script_path,
+ type: :string,
+ description: "Path to a custom script to automate cache invalidation."
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
key: :gopher,
type: :group,
description: "Gopher settings",