projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c95533
)
Ensure GIFs are redirected to the original or they become static.
author
Mark Felder
<feld@FreeBSD.org>
Wed, 26 Aug 2020 21:18:11 +0000
(16:18 -0500)
committer
Mark Felder
<feld@FreeBSD.org>
Wed, 26 Aug 2020 21:18:11 +0000
(16:18 -0500)
lib/pleroma/web/media_proxy/media_proxy_controller.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/media_proxy/media_proxy_controller.ex
b/lib/pleroma/web/media_proxy/media_proxy_controller.ex
index 6abbf9e238007dee46ac46eb90eff06923910ca4..d465ce8d10e530b036bbf789e986ffdc3bf7bcab 100644
(file)
--- a/
lib/pleroma/web/media_proxy/media_proxy_controller.ex
+++ b/
lib/pleroma/web/media_proxy/media_proxy_controller.ex
@@
-65,6
+65,12
@@
defmodule Pleroma.Web.MediaProxy.MediaProxyController do
end
end
+ defp handle_preview("image/gif" = _content_type, conn, url) do
+ mediaproxy_url = url |> MediaProxy.url()
+
+ redirect(conn, external: mediaproxy_url)
+ end
+
defp handle_preview("image/" <> _ = _content_type, conn, url) do
handle_image_preview(conn, url)
end