Merge remote-tracking branch 'remotes/origin/develop' into ostatus-controller-no...
authorIvan Tashkinov <ivantashkinov@gmail.com>
Sat, 17 Oct 2020 10:12:39 +0000 (13:12 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Sat, 17 Oct 2020 10:12:39 +0000 (13:12 +0300)
# Conflicts:
# lib/pleroma/web/feed/user_controller.ex
# lib/pleroma/web/o_status/o_status_controller.ex
# lib/pleroma/web/router.ex
# lib/pleroma/web/static_fe/static_fe_controller.ex

1  2 
CHANGELOG.md
lib/pleroma/web/feed/user_controller.ex
lib/pleroma/web/o_status/o_status_controller.ex
lib/pleroma/web/router.ex
test/pleroma/web/activity_pub/activity_pub_controller_test.exs
test/pleroma/web/feed/tag_controller_test.exs
test/pleroma/web/feed/user_controller_test.exs
test/pleroma/web/o_status/o_status_controller_test.exs
test/pleroma/web/static_fe/static_fe_controller_test.exs

diff --cc CHANGELOG.md
Simple merge
index e03ca8c0a747241c4b3d90975a87cbc5b093fef6,b044260b3602e6c1e0a2dd24d80fe97d129d1a88..668ae0ea4fde363ba01e4eb24f92380d4e61ae76
@@@ -13,9 -11,15 +11,11 @@@ defmodule Pleroma.Web.OStatus.OStatusCo
    alias Pleroma.Web.ActivityPub.ActivityPubController
    alias Pleroma.Web.ActivityPub.Visibility
    alias Pleroma.Web.Endpoint
+   alias Pleroma.Web.Fallback.RedirectController
    alias Pleroma.Web.Metadata.PlayerView
+   alias Pleroma.Web.Plugs.RateLimiter
    alias Pleroma.Web.Router
  
 -  plug(Pleroma.Web.Plugs.EnsureAuthenticatedPlug,
 -    unless_func: &Pleroma.Web.Plugs.FederatingPlug.federating?/1
 -  )
 -
    plug(
      RateLimiter,
      [name: :ap_routes, params: ["uuid"]] when action in [:object, :activity]
index ef56360ed808ab7123ae645040f74f65d688a5ab,d2d93998965e8592cd72429abacd96b46a7e88d0..07a574f35f46553ab1eb9290503d3ab2f251fd26
@@@ -586,10 -566,17 +586,10 @@@ defmodule Pleroma.Web.Router d
      )
    end
  
 -  pipeline :ostatus do
 -    plug(:accepts, ["html", "xml", "rss", "atom", "activity+json", "json"])
 -    plug(Pleroma.Web.Plugs.StaticFEPlug)
 -  end
 -
 -  pipeline :oembed do
 -    plug(:accepts, ["json", "xml"])
 -  end
 -
    scope "/", Pleroma.Web do
 -    pipe_through([:ostatus, :http_signature])
 +    # Note: html format is supported only if static FE is enabled
 +    # Note: http signature is only considered for json requests (no auth for non-json requests)
-     pipe_through([:accepts_html_json, :http_signature, Pleroma.Plugs.StaticFEPlug])
++    pipe_through([:accepts_html_json, :http_signature, Pleroma.Web.Plugs.StaticFEPlug])
  
      get("/objects/:uuid", OStatus.OStatusController, :object)
      get("/activities/:uuid", OStatus.OStatusController, :activity)
      # Mastodon compatibility routes
      get("/users/:nickname/statuses/:id", OStatus.OStatusController, :object)
      get("/users/:nickname/statuses/:id/activity", OStatus.OStatusController, :activity)
 +  end
  
 -    get("/users/:nickname/feed", Feed.UserController, :feed, as: :user_feed)
 +  scope "/", Pleroma.Web do
 +    # Note: html format is supported only if static FE is enabled
 +    # Note: http signature is only considered for json requests (no auth for non-json requests)
-     pipe_through([:accepts_html_xml_json, :http_signature, Pleroma.Plugs.StaticFEPlug])
++    pipe_through([:accepts_html_xml_json, :http_signature, Pleroma.Web.Plugs.StaticFEPlug])
 +
 +    # Note: returns user _profile_ for json requests, redirects to user _feed_ for non-json ones
      get("/users/:nickname", Feed.UserController, :feed_redirect, as: :user_feed)
-     pipe_through([:accepts_html_xml, Pleroma.Plugs.StaticFEPlug])
 +  end
 +
 +  scope "/", Pleroma.Web do
 +    # Note: html format is supported only if static FE is enabled
++    pipe_through([:accepts_html_xml, Pleroma.Web.Plugs.StaticFEPlug])
  
 +    get("/users/:nickname/feed", Feed.UserController, :feed, as: :user_feed)
 +  end
 +
 +  scope "/", Pleroma.Web do
 +    pipe_through(:accepts_html)
 +    get("/notice/:id/embed_player", OStatus.OStatusController, :notice_player)
 +  end
 +
 +  scope "/", Pleroma.Web do
 +    pipe_through(:accepts_xml_rss_atom)
      get("/tags/:tag", Feed.TagController, :feed, as: :tag_feed)
    end