projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
expanding validator
[akkoma]
/
lib
/
pleroma
/
web
/
media_proxy
/
invalidation.ex
diff --git
a/lib/pleroma/web/media_proxy/invalidation.ex
b/lib/pleroma/web/media_proxy/invalidation.ex
index 6da7eb720ac9349ad01bdc567d1ddb4dae438619..cb2db5ce9ddef7c5179eac190546d920f9eec681 100644
(file)
--- a/
lib/pleroma/web/media_proxy/invalidation.ex
+++ b/
lib/pleroma/web/media_proxy/invalidation.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MediaProxy.Invalidation do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MediaProxy.Invalidation do
@@
-26,12
+26,15
@@
defmodule Pleroma.Web.MediaProxy.Invalidation do
defp do_purge(urls) do
provider = Config.get([:media_proxy, :invalidation, :provider])
defp do_purge(urls) do
provider = Config.get([:media_proxy, :invalidation, :provider])
- provider.purge(urls, Config.get(provider))
+ options = Config.get(provider)
+ provider.purge(urls, options)
end
def prepare_urls(urls) do
urls
|> List.wrap()
end
def prepare_urls(urls) do
urls
|> List.wrap()
- |> Enum.map(&MediaProxy.url/1)
+ |> Enum.map(fn url -> [MediaProxy.url(url), MediaProxy.preview_url(url)] end)
+ |> List.flatten()
+ |> Enum.uniq()
end
end
end
end