Merge remote-tracking branch 'pleroma/develop' into cycles-base-url

This commit is contained in:
Alex Gleason 2021-05-31 16:49:46 -05:00
commit f2134e605b
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
186 changed files with 5816 additions and 1315 deletions

View file

@ -121,6 +121,11 @@ defmodule Pleroma.Web.MediaProxy do
end
end
def decode_url(encoded) do
[_, "proxy", sig, base64 | _] = URI.parse(encoded).path |> String.split("/")
decode_url(sig, base64)
end
defp signed_url(url) do
:crypto.hmac(:sha, Config.get([Endpoint, :secret_key_base]), url)
end