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
|
end
|
||||||
|
|
||||||
pipeline :well_known do
|
pipeline :well_known do
|
||||||
plug(:accepts, ["json", "jrd+json", "xml", "xrd+xml"])
|
plug(:accepts, ["json", "jrd", "jrd+json", "xml", "xrd+xml"])
|
||||||
end
|
end
|
||||||
|
|
||||||
pipeline :config do
|
pipeline :config do
|
||||||
|
|
|
@ -30,7 +30,7 @@ def webfinger(%{assigns: %{format: format}} = conn, %{"resource" => resource})
|
||||||
end
|
end
|
||||||
|
|
||||||
def webfinger(%{assigns: %{format: format}} = conn, %{"resource" => resource})
|
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
|
with {:ok, response} <- WebFinger.webfinger(resource, "JSON") do
|
||||||
json(conn, response)
|
json(conn, response)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue