From 5361371d8a411eb37bd307def14c452c69a2b3c4 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 7 Nov 2018 16:45:11 +0100 Subject: [PATCH] Fixes a webfinger issue, and adds html profile in webfinger query Signed-off-by: Thomas Citharel --- lib/mobilizon_web/router.ex | 2 +- lib/service/web_finger/web_finger.ex | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/mobilizon_web/router.ex b/lib/mobilizon_web/router.ex index 7707dc3b..bda486b2 100644 --- a/lib/mobilizon_web/router.ex +++ b/lib/mobilizon_web/router.ex @@ -10,7 +10,7 @@ defmodule MobilizonWeb.Router do end pipeline :well_known do - plug(:accepts, ["json/application", "jrd-json", "application/json"]) + plug(:accepts, ["json", "jrd-json"]) end pipeline :activity_pub do diff --git a/lib/service/web_finger/web_finger.ex b/lib/service/web_finger/web_finger.ex index 746bfc7c..fbde30b0 100644 --- a/lib/service/web_finger/web_finger.ex +++ b/lib/service/web_finger/web_finger.ex @@ -52,7 +52,12 @@ defmodule Mobilizon.Service.WebFinger do "subject" => "acct:#{user.preferred_username}@#{MobilizonWeb.Endpoint.host()}", "aliases" => [user.url], "links" => [ - %{"rel" => "self", "type" => "application/activity+json", "href" => user.url} + %{"rel" => "self", "type" => "application/activity+json", "href" => user.url}, + %{ + "rel" => "https://webfinger.net/rel/profile-page/", + "type" => "text/html", + "href" => user.url + } ] } end