Add a stats agent for storing data from expensive queries.
[akkoma] / lib / pleroma / web / router.ex
index 374b8f25139419f6c059b3e248159ffc121f5f10..09104fc86c366c1caa61d05645ec95a054ccc928 100644 (file)
@@ -106,6 +106,7 @@ defmodule Pleroma.Web.Router do
   scope "/api/v1", Pleroma.Web.MastodonAPI do
     pipe_through :api
     get "/instance", MastodonAPIController, :masto_instance
+    get "/instance/peers", MastodonAPIController, :peers
     post "/apps", MastodonAPIController, :create_app
     get "/custom_emojis", MastodonAPIController, :custom_emojis
 
@@ -238,6 +239,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