fix: respond with JSON Resource Descriptor Content-Type per RFC7033

This commit is contained in:
Aravinth Manivannan 2024-03-24 18:05:46 +05:30
parent f42c458782
commit 5f142647ef
Signed by: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -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),