From 10fdf9ef8997ea026e86a3ce5c2f40c16819536f Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Mon, 2 Jan 2023 14:17:43 -0500 Subject: adjust content types --- http/router.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'http/router.go') 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{}{}) -- cgit v1.2.3