Insert meta tags into static index.html on the fly for OStatus#notice
[akkoma] / lib / pleroma / web / router.ex
index 9c06fac4f30bf9a5d3a53d207037f0f83e78c629..3239249f913bbb3cd5a9bf79ccfe8a68fc77717e 100644 (file)
@@ -354,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)
 
@@ -369,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)