distraction.party/lib/pleroma/web/media_proxy/invalidations/nginx.ex
2020-05-15 21:39:42 +03:00

12 lines
300 B
Elixir

defmodule Pleroma.Web.MediaProxy.Invalidation.Nginx do
@behaviour Pleroma.Web.MediaProxy.Invalidation
@impl Pleroma.Web.MediaProxy.Invalidation
def purge(urls, _opts) do
Enum.each(urls, fn url ->
Pleroma.HTTP.request(:purge, url, "", [], [])
end)
{:ok, "success"}
end
end