diff options
author | Julio Capote <jcapote@gmail.com> | 2023-01-02 19:17:43 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2023-01-02 19:17:43 +0000 |
commit | 10fdf9ef8997ea026e86a3ce5c2f40c16819536f (patch) | |
tree | 9c4c15a05c12ea67a4dc608ace5c3ef80e8098bf /http | |
parent | 5d64d6ac469dc6e92792121cab0f102cebb8670f (diff) | |
download | communique-10fdf9ef8997ea026e86a3ce5c2f40c16819536f.tar.gz |
adjust content types
Diffstat (limited to 'http')
-rw-r--r-- | http/router.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/http/router.go b/http/router.go index a0cc351..a34ff7c 100644 --- a/http/router.go +++ b/http/router.go @@ -23,7 +23,7 @@ func render(c *gin.Context, resource map[string]interface{}, err error) { jsonErr := c.Error(err) c.JSON(http.StatusInternalServerError, jsonErr.JSON()) } else { - c.Writer.Header().Set("Content-Type", "application/activity+json") + c.Writer.Header().Set("Content-Type", "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") c.JSON(http.StatusOK, resource) } } @@ -39,6 +39,7 @@ func (s *Router) Start(zapWriter io.Writer) { resourceParam := c.Query("resource") resource, _ := s.registry.Webfinger(resourceParam) if resource != nil { + c.Writer.Header().Set("Content-Type", "application/jrd+json") c.JSON(http.StatusOK, resource) } else { c.JSON(http.StatusNotFound, map[string]interface{}{}) |