Handle more json-like content types
This commit is contained in:
parent
2bf3b156a7
commit
4851b5fd61
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue