Add cached RSS feeds for actors endpoints

This commit is contained in:
Thomas Citharel
2019-02-27 16:28:09 +01:00
parent 976186a18d
commit 02d1cea2d7
14 changed files with 462 additions and 62 deletions

View File

@@ -22,6 +22,11 @@ defmodule MobilizonWeb.Router do
plug(:accepts, ["activity-json", "html"])
end
pipeline :activity_pub_rss do
plug(TrailingFormatPlug)
plug(:accepts, ["activity-json", "html", "atom"])
end
pipeline :browser do
plug(:accepts, ["html"])
plug(:fetch_session)
@@ -52,9 +57,14 @@ defmodule MobilizonWeb.Router do
end
scope "/", MobilizonWeb do
pipe_through(:activity_pub)
pipe_through(:activity_pub_rss)
get("/@:name", ActivityPubController, :actor)
end
scope "/", MobilizonWeb do
pipe_through(:activity_pub)
get("/@:name/outbox", ActivityPubController, :outbox)
get("/@:name/following", ActivityPubController, :following)
get("/@:name/followers", ActivityPubController, :followers)