summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r--routers/api/v1/repo/repo.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index d222c9b080..0f85d917d1 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -230,8 +230,7 @@ func Search(ctx *context.APIContext) {
}
ctx.SetLinkHeader(int(count), opts.PageSize)
- ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", count))
- ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link")
+ ctx.SetTotalCountHeader(count)
ctx.JSON(http.StatusOK, api.SearchResults{
OK: true,
Data: results,