media proxy: good enough wip

This commit is contained in:
href 2017-11-22 19:06:07 +01:00
commit 5f35fdcf5d
No known key found for this signature in database
GPG key ID: EE8296C1A152C325
7 changed files with 101 additions and 8 deletions

View file

@ -233,6 +233,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