projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix-search-dos' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
media_proxy
/
invalidation
/
script.ex
diff --git
a/lib/pleroma/web/media_proxy/invalidation/script.ex
b/lib/pleroma/web/media_proxy/invalidation/script.ex
index c447614fa8c113a1f8668b3b7b3d8a541a2070a2..87a21166cd9dee8679d4ffb6cdf2c0e24fc4eee6 100644
(file)
--- a/
lib/pleroma/web/media_proxy/invalidation/script.ex
+++ b/
lib/pleroma/web/media_proxy/invalidation/script.ex
@@
-13,7
+13,7
@@
defmodule Pleroma.Web.MediaProxy.Invalidation.Script do
def purge(urls, opts \\ []) do
args =
urls
def purge(urls, opts \\ []) do
args =
urls
- |> format_urls(Keyword.get(opts, :url_format))
+ |>
maybe_
format_urls(Keyword.get(opts, :url_format))
|> List.wrap()
|> Enum.uniq()
|> Enum.join(" ")
|> List.wrap()
|> Enum.uniq()
|> Enum.join(" ")
@@
-42,7
+42,7
@@
defmodule Pleroma.Web.MediaProxy.Invalidation.Script do
{:error, inspect(error)}
end
{:error, inspect(error)}
end
- def format_urls(urls, :htcacheclean) do
+ def
maybe_
format_urls(urls, :htcacheclean) do
urls
|> Enum.map(fn url ->
uri = URI.parse(url)
urls
|> Enum.map(fn url ->
uri = URI.parse(url)
@@
-58,5
+58,5
@@
defmodule Pleroma.Web.MediaProxy.Invalidation.Script do
end)
end
end)
end
- def format_urls(urls, _), do: urls
+ def
maybe_
format_urls(urls, _), do: urls
end
end