Phoenix detects the webfinger requests with content-type application/jrd+json as "jrd" now
This commit is contained in:
parent
347e5f33c7
commit
1b5168ae02
|
@ -182,7 +182,7 @@ defmodule Pleroma.Web.Router do
|
|||
end
|
||||
|
||||
pipeline :well_known do
|
||||
plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
|
||||
plug(:accepts, ["json", "jrd", "jrd+json", "xml", "xrd+xml"])
|
||||
end
|
||||
|
||||
pipeline :config do
|
||||
|
|
|
@ -30,7 +30,7 @@ def webfinger(%{assigns: %{format: format}} = conn, %{"resource" => resource})
|
|||
end
|
||||
|
||||
def webfinger(%{assigns: %{format: format}} = conn, %{"resource" => resource})
|
||||
when format in ["json", "jrd+json"] do
|
||||
when format in ["jrd", "json", "jrd+json"] do
|
||||
with {:ok, response} <- WebFinger.webfinger(resource, "JSON") do
|
||||
json(conn, response)
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue