diff options
author | Jeff Becker <jeff@i2p.rocks> | 2018-01-24 13:15:54 -0500 |
---|---|---|
committer | Jeff Becker <jeff@i2p.rocks> | 2018-01-24 13:15:54 -0500 |
commit | dffde6631d105949b62c1ff27c22fefcb873b2e8 (patch) | |
tree | f486f66ae4067ec1bc0dec7f265765b6d35a9c58 /lib/pleroma/web/router.ex | |
parent | 1e185b9301ec85cd2aaeb1faf075aaa86f733373 (diff) | |
parent | 0f722a8c223c1953c9c9fb45e73cc9ace92839e2 (diff) | |
download | pleroma-dffde6631d105949b62c1ff27c22fefcb873b2e8.tar.gz |
Merge remote-tracking branch 'upstream/develop' into pr-upstream-http-proxy
Diffstat (limited to 'lib/pleroma/web/router.ex')
-rw-r--r-- | lib/pleroma/web/router.ex | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 8e6681e68..63dbd6245 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -28,6 +28,13 @@ defmodule Pleroma.Web.Router do plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Router.user_fetcher/1, optional: true} end + pipeline :pleroma_html do + plug :accepts, ["html"] + plug :fetch_session + plug Pleroma.Plugs.OAuthPlug + plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Router.user_fetcher/1, optional: true} + end + pipeline :well_known do plug :accepts, ["xml", "xrd+xml"] end @@ -51,6 +58,12 @@ defmodule Pleroma.Web.Router do get "/emoji", UtilController, :emoji end + scope "/", Pleroma.Web.TwitterAPI do + pipe_through :pleroma_html + get "/ostatus_subscribe", UtilController, :remote_follow + post "/ostatus_subscribe", UtilController, :do_remote_follow + end + scope "/api/pleroma", Pleroma.Web.TwitterAPI do pipe_through :authenticated_api post "/follow_import", UtilController, :follow_import @@ -106,6 +119,7 @@ defmodule Pleroma.Web.Router do scope "/api/v1", Pleroma.Web.MastodonAPI do pipe_through :api get "/instance", MastodonAPIController, :masto_instance + get "/instance/peers", MastodonAPIController, :peers post "/apps", MastodonAPIController, :create_app get "/custom_emojis", MastodonAPIController, :custom_emojis |