commit: 1b5168ae021fa9d6b154b25444dd96c812083ce7
parent 347e5f33c775ae1de8bffe0ba84611b3d7a59d8f
Author: Mark Felder <feld@feld.me>
Date: Tue, 28 Nov 2023 20:46:41 +0000
Phoenix detects the webfinger requests with content-type application/jrd+json as "jrd" now
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
@@ -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
diff --git a/lib/pleroma/web/web_finger/web_finger_controller.ex b/lib/pleroma/web/web_finger/web_finger_controller.ex
@@ -30,7 +30,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerController do
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