Commit 3771db97 authored by feld's avatar feld

Add MediaProxy invalidation settings to description.exs

parent e0d1a942
Pipeline #26219 passed with stages
in 16 minutes and 52 seconds
......@@ -1632,6 +1632,31 @@
"The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
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,
......@@ -1704,6 +1729,43 @@
}
]
},
%{
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment