summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user/repo.go')
-rw-r--r--routers/api/v1/user/repo.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index dbd18f133d..ae5e319c27 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -43,6 +43,7 @@ func listUserRepos(ctx *context.APIContext, u *models.User, private bool) {
ctx.SetLinkHeader(int(count), opts.PageSize)
ctx.Header().Set("X-Total-Count", strconv.FormatInt(count, 10))
+ ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link")
ctx.JSON(http.StatusOK, &apiRepos)
}
@@ -129,6 +130,7 @@ func ListMyRepos(ctx *context.APIContext) {
ctx.SetLinkHeader(int(count), opts.ListOptions.PageSize)
ctx.Header().Set("X-Total-Count", strconv.FormatInt(count, 10))
+ ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link")
ctx.JSON(http.StatusOK, &results)
}