Merge branch 'permissive-webfinger' into 'develop'
WebFinger query default to return JSON when no or unrecognized accept header is provided. Closes #3381 See merge request pleroma/pleroma!4345
This commit is contained in:
commit
93ce56418e
3 changed files with 44 additions and 9 deletions
|
|
@ -41,5 +41,10 @@ defmodule Pleroma.Web.WebFinger.WebFingerController do
|
|||
end
|
||||
end
|
||||
|
||||
# Default to JSON when no format is specified or format is not recognized
|
||||
def webfinger(%{assigns: %{format: _format}} = conn, %{"resource" => _resource} = params) do
|
||||
webfinger(put_in(conn.assigns.format, "json"), params)
|
||||
end
|
||||
|
||||
def webfinger(conn, _params), do: send_resp(conn, 400, "Bad Request")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue