X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Frouter.ex;h=3239249f913bbb3cd5a9bf79ccfe8a68fc77717e;hb=d903e34cacd18157a2a60e7b112eb05af2766266;hp=4d24d4c1c587ebb2ae6f474d752a253ad344792f;hpb=7d86c0c53f6377119581ddc9e9dfe5c0937ffe01;p=akkoma diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 4d24d4c1c..3239249f9 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -1,8 +1,6 @@ defmodule Pleroma.Web.Router do use Pleroma.Web, :router - alias Pleroma.{Repo, User, Web.Router} - pipeline :api do plug(:accepts, ["json"]) plug(:fetch_session) @@ -356,6 +354,10 @@ defmodule Pleroma.Web.Router do plug(:accepts, ["xml", "atom", "html", "activity+json"]) end + pipeline :oembed do + plug(:accepts, ["json", "xml"]) + end + scope "/", Pleroma.Web do pipe_through(:ostatus) @@ -371,6 +373,12 @@ defmodule Pleroma.Web.Router do post("/push/subscriptions/:id", Websub.WebsubController, :websub_incoming) end + scope "/", Pleroma.Web do + pipe_through(:oembed) + + get("/oembed", OEmbed.OEmbedController, :url) + end + pipeline :activitypub do plug(:accepts, ["activity+json"]) plug(Pleroma.Web.Plugs.HTTPSignaturePlug)