diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-05 06:37:16 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-05 06:37:16 +0300 |
commit | a0fab4e9b6db19fa344c5479d3c5e521708e2be4 (patch) | |
tree | cac4fe1493b1eb695a00ffa5573c473bb3fbfec8 | |
parent | 55825b46bef6e397778adc58276f634f2006a823 (diff) | |
download | pleroma-a0fab4e9b6db19fa344c5479d3c5e521708e2be4.tar.gz |
update config/description.exs
-rw-r--r-- | config/description.exs | 64 | ||||
-rw-r--r-- | docs/configuration/cheatsheet.md | 6 |
2 files changed, 67 insertions, 3 deletions
diff --git a/config/description.exs b/config/description.exs index 807c945e0..996f7d810 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1638,6 +1638,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", @@ -1711,6 +1736,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", diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index 505acb293..20bd0ed85 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -262,7 +262,7 @@ This section describe PWA manifest instance-specific values. Currently this opti #### Pleroma.Web.MediaProxy.Invalidation.Script -This strategy allow perform external bash script to purge cache. +This strategy allow perform external shell script to purge cache. Urls of attachments pass to script as arguments. * `script_path`: path to external script. @@ -278,8 +278,8 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, This strategy allow perform custom http request to purge cache. * `method`: http method. default is `purge` -* `headers`: http headers. default is empty -* `options`: request options. default is empty +* `headers`: http headers. +* `options`: request options. Example: ```elixir |