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 :phoenix, :json_library, Jason
|
||||||
|
|
||||||
config :mime, :types, %{
|
config :mime, :types, %{
|
||||||
"application/activity+json" => ["activity+json"]
|
"application/activity+json" => ["activity+json"],
|
||||||
|
"application/jrd+json" => ["json"]
|
||||||
}
|
}
|
||||||
|
|
||||||
config :http_signatures, adapter: Clacks.SignatureAdapter
|
config :http_signatures, adapter: Clacks.SignatureAdapter
|
||||||
|
|
|
@ -19,11 +19,11 @@ defmodule ClacksWeb.Router do
|
||||||
end
|
end
|
||||||
|
|
||||||
pipeline :activitypub do
|
pipeline :activitypub do
|
||||||
plug :accepts, ["activity+json", "html"]
|
plug :accepts, ["activity+json", "json", "html"]
|
||||||
end
|
end
|
||||||
|
|
||||||
pipeline :browser_or_activitypub do
|
pipeline :browser_or_activitypub do
|
||||||
plug :accepts, ["html", "activity+json"]
|
plug :accepts, ["html", "activity+json", "json"]
|
||||||
plug ClacksWeb.Plug.Format
|
plug ClacksWeb.Plug.Format
|
||||||
plug :browser_if_html
|
plug :browser_if_html
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue