Handle more json-like content types

This commit is contained in:
Shadowfacts 2021-08-25 23:15:09 -04:00
parent 2bf3b156a7
commit 4851b5fd61
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,8 @@ config :logger, :console,
config :phoenix, :json_library, Jason
config :mime, :types, %{
"application/activity+json" => ["activity+json"]
"application/activity+json" => ["activity+json"],
"application/jrd+json" => ["json"]
}
config :http_signatures, adapter: Clacks.SignatureAdapter

View File

@ -19,11 +19,11 @@ defmodule ClacksWeb.Router do
end
pipeline :activitypub do
plug :accepts, ["activity+json", "html"]
plug :accepts, ["activity+json", "json", "html"]
end
pipeline :browser_or_activitypub do
plug :accepts, ["html", "activity+json"]
plug :accepts, ["html", "activity+json", "json"]
plug ClacksWeb.Plug.Format
plug :browser_if_html
end