mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 21:35:35 +03:00
Merge pull request 'fix: respond with JSON Resource Descriptor Content-Type per RFC7033' (#2882) from realaravinth/forgejo:cb-2871 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2882 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
04fcaf783e
2 changed files with 2 additions and 0 deletions
|
@ -118,4 +118,5 @@ func WebfingerQuery(ctx *context.Context) {
|
|||
Aliases: aliases,
|
||||
Links: links,
|
||||
})
|
||||
ctx.Resp.Header().Set("Content-Type", "application/jrd+json")
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue