Skip to content

Commit

Permalink
Update ratelimiter.go
Browse files Browse the repository at this point in the history
  • Loading branch information
aasifkhan7 authored Oct 14, 2024
1 parent 2e07bc7 commit 1a1572c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/middleware/ratelimiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,7 @@ func addRateLimitHeaders(w http.ResponseWriter, limit, remaining, used, resetTim
w.Header().Set("x-ratelimit-remaining", strconv.FormatInt(remaining, 10))
w.Header().Set("x-ratelimit-used", strconv.FormatInt(used, 10))
w.Header().Set("x-ratelimit-reset", strconv.FormatInt(resetTime, 10))

// Expose the rate limit headers to the client
w.Header().Set("Access-Control-Expose-Headers", "x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-used, x-ratelimit-reset")
}

0 comments on commit 1a1572c

Please sign in to comment.