projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add opengraph/twitter_card:summary support. Add config to toggle on/off specific...
[akkoma]
/
lib
/
pleroma
/
web
/
router.ex
diff --git
a/lib/pleroma/web/router.ex
b/lib/pleroma/web/router.ex
index 4d24d4c1c587ebb2ae6f474d752a253ad344792f..3239249f913bbb3cd5a9bf79ccfe8a68fc77717e 100644
(file)
--- 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
defmodule Pleroma.Web.Router do
use Pleroma.Web, :router
- alias Pleroma.{Repo, User, Web.Router}
-
pipeline :api do
plug(:accepts, ["json"])
plug(:fetch_session)
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
plug(:accepts, ["xml", "atom", "html", "activity+json"])
end
+ pipeline :oembed do
+ plug(:accepts, ["json", "xml"])
+ end
+
scope "/", Pleroma.Web do
pipe_through(:ostatus)
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
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)
pipeline :activitypub do
plug(:accepts, ["activity+json"])
plug(Pleroma.Web.Plugs.HTTPSignaturePlug)