diff --git a/routers/web/webfinger.go b/routers/web/webfinger.go index a87c426b3b..e4b2aacce8 100644 --- a/routers/web/webfinger.go +++ b/routers/web/webfinger.go @@ -118,4 +118,5 @@ func WebfingerQuery(ctx *context.Context) { Aliases: aliases, Links: links, }) + ctx.Resp.Header().Set("Content-Type", "application/jrd+json") } diff --git a/tests/integration/webfinger_test.go b/tests/integration/webfinger_test.go index a1abc8d32b..55fb211779 100644 --- a/tests/integration/webfinger_test.go +++ b/tests/integration/webfinger_test.go @@ -48,6 +48,7 @@ func TestWebfinger(t *testing.T) { req := NewRequest(t, "GET", fmt.Sprintf("/.well-known/webfinger?resource=acct:%s@%s", user.LowerName, appURL.Host)) resp := MakeRequest(t, req, http.StatusOK) + assert.Equal(t, resp.Header().Get("Content-Type"), "application/jrd+json") var jrd webfingerJRD DecodeJSON(t, resp, &jrd)