Skip to content

Commit

Permalink
httptransport: add mime type to indexer and matcher handler
Browse files Browse the repository at this point in the history
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
  • Loading branch information
arajkumar authored and ldelossa committed Mar 29, 2021
1 parent 1c85589 commit 21dc720
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions httptransport/indexreporthandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func IndexReportHandler(serv indexer.StateReporter) http.HandlerFunc {
return
}

w.Header().Set("content-type", "application/json")
w.Header().Add("etag", validator)
defer writerError(w, &err)()
enc := codec.GetEncoder(w)
Expand Down
2 changes: 2 additions & 0 deletions httptransport/vulnerabilityreporthandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func VulnerabilityReportHandler(service matcher.Service, indexer indexer.Service
return
}

w.Header().Set("content-type", "application/json")

defer writerError(w, &err)()
enc := codec.GetEncoder(w)
defer codec.PutEncoder(enc)
Expand Down

0 comments on commit 21dc720

Please sign in to comment.