X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=docs%2Fconfiguration%2Fcheatsheet.md;h=9af8ee95ad660ceb60caf35956bfef7cfbbe925f;hb=94ba5a780212920a1d4b303c3523f66ca0147a67;hp=ce3bf3af7f892a353ab359fae380011c56ebe320;hpb=7e3814390e3e2695c514953562314bf46c1e49b0;p=akkoma diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index ce3bf3af7..9af8ee95a 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -249,6 +249,40 @@ This section describe PWA manifest instance-specific values. Currently this opti * `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)]`. * `whitelist`: List of domains to bypass the mediaproxy +* `invalidation`: options for remove media from cache after delete object: + * `enabled`: Enables purge cache + * `provider`: Which one of the [purge cache strategy](#purge-cache-strategy) to use. + +### Purge cache strategy + +#### Pleroma.Web.MediaProxy.Invalidation.Script + +This strategy allow perform external bash script to purge cache. +Urls of attachments pass to script as arguments. + +* `script_path`: path to external script. + +Example: +```elixir +config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, + script_path: "./installation/nginx-cache-purge.example" +``` + +#### Pleroma.Web.MediaProxy.Invalidation.Http + +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 + +Example: +```elixir +config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http, + method: :purge, + headers: [], + options: [] +``` ## Link previews