projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
899ea2d
)
Redirects for videos right now
author
Mark Felder
<feld@FreeBSD.org>
Tue, 25 Aug 2020 22:31:55 +0000
(17:31 -0500)
committer
Mark Felder
<feld@FreeBSD.org>
Tue, 25 Aug 2020 22:31:55 +0000
(17:31 -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 b925973ba6cf587683a781da759b2c93397e4d20..6abbf9e238007dee46ac46eb90eff06923910ca4 100644
(file)
--- a/
lib/pleroma/web/media_proxy/media_proxy_controller.ex
+++ b/
lib/pleroma/web/media_proxy/media_proxy_controller.ex
@@
-69,6
+69,12
@@
defmodule Pleroma.Web.MediaProxy.MediaProxyController do
handle_image_preview(conn, url)
end
+ defp handle_preview("video/" <> _ = _content_type, conn, url) do
+ mediaproxy_url = url |> MediaProxy.url()
+
+ redirect(conn, external: mediaproxy_url)
+ end
+
defp handle_preview(content_type, conn, _url) do
send_resp(conn, :unprocessable_entity, "Unsupported content type: #{content_type}.")
end