From 5f142647eff2188dc9cae4fe237ef5d5aea15605 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sun, 24 Mar 2024 18:05:46 +0530 Subject: [PATCH] fix: respond with JSON Resource Descriptor Content-Type per RFC7033 --- routers/web/webfinger.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/web/webfinger.go b/routers/web/webfinger.go index 35f3bbff8..a30844360 100644 --- a/routers/web/webfinger.go +++ b/routers/web/webfinger.go @@ -125,6 +125,7 @@ func WebfingerQuery(ctx *context.Context) { }, } + ctx.Resp.Header().Add("Content-Type", "application/jrd+json") ctx.Resp.Header().Add("Access-Control-Allow-Origin", "*") ctx.JSON(http.StatusOK, &webfingerJRD{ Subject: fmt.Sprintf("acct:%s@%s", url.QueryEscape(u.Name), appURL.Host),