Merge branch 'media-proxy' into 'develop'

Media proxy

See merge request pleroma/pleroma!34
This commit is contained in:
lambda 2017-12-20 14:22:24 +00:00
commit 35ac549a99
10 changed files with 152 additions and 10 deletions

View file

@ -238,6 +238,14 @@ defmodule Pleroma.Web.Router do
delete "/auth/sign_out", MastodonAPIController, :logout
end
pipeline :remote_media do
plug :accepts, ["html"]
end
scope "/proxy/", Pleroma.Web.MediaProxy do
pipe_through :remote_media
get "/:sig/:url", MediaProxyController, :remote
end
scope "/", Fallback do
get "/*path", RedirectController, :redirector
end