diff options
Diffstat (limited to 'lib/pleroma/web/router.ex')
-rw-r--r-- | lib/pleroma/web/router.ex | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 59fb5cd6b..520ac4a8c 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -222,7 +222,7 @@ defmodule Pleroma.Web.Router do end pipeline :ostatus do - plug :accepts, ["xml", "atom", "html"] + plug :accepts, ["xml", "atom", "html", "activity+json"] end scope "/", Pleroma.Web do @@ -243,7 +243,18 @@ defmodule Pleroma.Web.Router do end + pipeline :activitypub do + plug :accepts, ["activity+json"] + plug Pleroma.Web.Plugs.HTTPSignaturePlug + end + if @federating do + scope "/", Pleroma.Web.ActivityPub do + pipe_through :activitypub + post "/users/:nickname/inbox", ActivityPubController, :inbox + post "/inbox", ActivityPubController, :inbox + end + scope "/.well-known", Pleroma.Web do pipe_through :well_known |