aboutsummaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-12-19 15:41:43 +0000
committerJulio Capote <jcapote@gmail.com>2022-12-19 15:41:43 +0000
commitafdf8a014236452e098ab1266c9a9315824f8103 (patch)
tree0c1db202f6f5c81783d7d2ccb1502443ab84a8ae /http
parent2211d7ace360548f6ee450f03d995c6bb246be2b (diff)
downloadcommunique-afdf8a014236452e098ab1266c9a9315824f8103.tar.gz
url helpers, cgi response format
Diffstat (limited to '')
-rw-r--r--http/server.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/http/server.go b/http/server.go
index 5d0a689..b3d3c9b 100644
--- a/http/server.go
+++ b/http/server.go
@@ -39,6 +39,7 @@ func (s *Server) Start(zapWriter io.Writer) {
actorParam := c.Param("actor")
resource, _ := s.registry.Profile(actorParam)
if resource != nil {
+ c.Writer.Header().Set("Content-Type", "application/activity+json")
c.JSON(http.StatusOK, resource)
} else {
c.JSON(http.StatusNotFound, nil)
@@ -68,6 +69,7 @@ func (s *Server) Start(zapWriter io.Writer) {
resource, _ = s.registry.Outbox(actorParam)
}
if resource != nil {
+ c.Writer.Header().Set("Content-Type", "application/activity+json")
c.JSON(http.StatusOK, resource)
} else {
c.JSON(http.StatusNotFound, nil)