Introduce relay

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-07-30 16:40:59 +02:00
parent 56467301a1
commit c51115bdbe
54 changed files with 3100 additions and 1038 deletions

View File

@@ -18,6 +18,10 @@ defmodule MobilizonWeb.Router do
plug(MobilizonWeb.HTTPSignaturePlug)
end
pipeline :relay do
plug(:accepts, ["activity-json", "json"])
end
pipeline :activity_pub do
plug(:accepts, ["activity-json"])
end
@@ -97,6 +101,13 @@ defmodule MobilizonWeb.Router do
post("/inbox", ActivityPubController, :inbox)
end
scope "/relay", MobilizonWeb do
pipe_through(:relay)
get("/", ActivityPubController, :relay)
post("/inbox", ActivityPubController, :inbox)
end
scope "/proxy/", MobilizonWeb do
pipe_through(:remote_media)