akkoma/lib/pleroma/web/media_proxy/invalidations/nginx.ex

13 lines
300 B
Elixir
Raw Normal View History

2020-05-15 18:34:46 +00:00
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