From: lain Date: Thu, 8 Mar 2018 11:37:06 +0000 (+0100) Subject: Merge branch 'develop' into feature/activitypub X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=611ca385dea3d611a97579000311cc42684305e6;p=akkoma Merge branch 'develop' into feature/activitypub --- 611ca385dea3d611a97579000311cc42684305e6 diff --cc lib/pleroma/web/router.ex index 8d93e1ea6,59fb5cd6b..520ac4a8c --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@@ -228,31 -231,25 +231,36 @@@ defmodule Pleroma.Web.Router d get "/objects/:uuid", OStatus.OStatusController, :object get "/activities/:uuid", OStatus.OStatusController, :activity get "/notice/:id", OStatus.OStatusController, :notice - get "/users/:nickname/feed", OStatus.OStatusController, :feed get "/users/:nickname", OStatus.OStatusController, :feed_redirect - post "/users/:nickname/salmon", OStatus.OStatusController, :salmon_incoming - post "/push/hub/:nickname", Websub.WebsubController, :websub_subscription_request - get "/push/subscriptions/:id", Websub.WebsubController, :websub_subscription_confirmation - post "/push/subscriptions/:id", Websub.WebsubController, :websub_incoming + + if @federating do + post "/users/:nickname/salmon", OStatus.OStatusController, :salmon_incoming + post "/push/hub/:nickname", Websub.WebsubController, :websub_subscription_request + get "/push/subscriptions/:id", Websub.WebsubController, :websub_subscription_confirmation + post "/push/subscriptions/:id", Websub.WebsubController, :websub_incoming + end + end + pipeline :activitypub do + plug :accepts, ["activity+json"] + plug Pleroma.Web.Plugs.HTTPSignaturePlug + end + - scope "/", Pleroma.Web.ActivityPub do - pipe_through :activitypub - post "/users/:nickname/inbox", ActivityPubController, :inbox - post "/inbox", ActivityPubController, :inbox - 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 + scope "/.well-known", Pleroma.Web do + pipe_through :well_known - get "/host-meta", WebFinger.WebFingerController, :host_meta - get "/webfinger", WebFinger.WebFingerController, :webfinger + get "/host-meta", WebFinger.WebFingerController, :host_meta + get "/webfinger", WebFinger.WebFingerController, :webfinger + end end scope "/", Pleroma.Web.MastodonAPI do