Merge branch 'media-proxy-safety' into 'develop'
[akkoma] / lib / pleroma / web / router.ex
index b461def82e155be654ff7c90efa0c427bc4e0a06..2d4302dcdc29e0efd2d5ae0ac362f3250f51fb2d 100644 (file)
@@ -272,6 +272,10 @@ defmodule Pleroma.Web.Router do
     get("/statuses/mentions_timeline", TwitterAPI.Controller, :mentions_timeline)
     get("/qvitter/statuses/notifications", TwitterAPI.Controller, :notifications)
 
+    # XXX: this is really a pleroma API, but we want to keep the pleroma namespace clean
+    #      for now.
+    post("/qvitter/statuses/notifications/read", TwitterAPI.Controller, :notifications_read)
+
     post("/statuses/update", TwitterAPI.Controller, :status_update)
     post("/statuses/retweet/:id", TwitterAPI.Controller, :retweet)
     post("/statuses/unretweet/:id", TwitterAPI.Controller, :unretweet)
@@ -374,12 +378,12 @@ defmodule Pleroma.Web.Router do
   end
 
   pipeline :remote_media do
-    plug(:accepts, ["html"])
   end
 
   scope "/proxy/", Pleroma.Web.MediaProxy do
     pipe_through(:remote_media)
     get("/:sig/:url", MediaProxyController, :remote)
+    get("/:sig/:url/:filename", MediaProxyController, :remote)
   end
 
   scope "/", Fallback do