summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-20 09:33:18 +0000
committerlain <lain@soykaf.club>2020-06-20 09:33:18 +0000
commit7d542450b13742c6efa93246c172c8306e730d50 (patch)
tree86998336bba747f1ce605a1c06e39ac96f38b396 /config
parent4733f6a3371504ebb3eeb447d7c20d56c10b43bf (diff)
parentf9282677731cca96a1316e2830507837535c06e0 (diff)
downloadpleroma-7d542450b13742c6efa93246c172c8306e730d50.tar.gz
pleroma-7d542450b13742c6efa93246c172c8306e730d50.zip
Merge branch 'develop' into '1865-media-only'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'config')
-rw-r--r--config/config.exs7
-rw-r--r--config/description.exs64
2 files changed, 71 insertions, 0 deletions
diff --git a/config/config.exs b/config/config.exs
index 6a7bb9e06..4bf31f3fc 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -407,6 +407,13 @@ config :pleroma, :media_proxy,
],
whitelist: []
+config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
+ method: :purge,
+ headers: [],
+ options: []
+
+config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil
+
config :pleroma, :chat, enabled: true
config :phoenix, :format_encoders, json: Jason
diff --git a/config/description.exs b/config/description.exs
index b21d7840c..f9523936a 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -1651,6 +1651,31 @@ config :pleroma, :config_description, [
suggestions: ["https://example.com"]
},
%{
+ key: :invalidation,
+ type: :keyword,
+ descpiption: "",
+ suggestions: [
+ enabled: true,
+ provider: Pleroma.Web.MediaProxy.Invalidation.Script
+ ],
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables invalidate media cache"
+ },
+ %{
+ key: :provider,
+ type: :module,
+ description: "Module which will be used to cache purge.",
+ suggestions: [
+ Pleroma.Web.MediaProxy.Invalidation.Script,
+ Pleroma.Web.MediaProxy.Invalidation.Http
+ ]
+ }
+ ]
+ },
+ %{
key: :proxy_opts,
type: :keyword,
description: "Options for Pleroma.ReverseProxy",
@@ -1724,6 +1749,45 @@ config :pleroma, :config_description, [
},
%{
group: :pleroma,
+ key: Pleroma.Web.MediaProxy.Invalidation.Http,
+ type: :group,
+ description: "HTTP invalidate settings",
+ children: [
+ %{
+ key: :method,
+ type: :atom,
+ description: "HTTP method of request. Default: :purge"
+ },
+ %{
+ key: :headers,
+ type: {:list, :tuple},
+ description: "HTTP headers of request.",
+ suggestions: [{"x-refresh", 1}]
+ },
+ %{
+ key: :options,
+ type: :keyword,
+ description: "Request options.",
+ suggestions: [params: %{ts: "xxx"}]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.MediaProxy.Invalidation.Script,
+ type: :group,
+ description: "Script invalidate settings",
+ children: [
+ %{
+ key: :script_path,
+ type: :string,
+ description: "Path to shell script. Which will run purge cache.",
+ suggestions: ["./installation/nginx-cache-purge.sh.example"]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
key: :gopher,
type: :group,
description: "Gopher settings",