Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cherry-yl-sh committed Mar 4, 2024
1 parent fdaa2a6 commit 0fea7f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rpc_server/middlewares/rate_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const (

var limiter map[string]*rate.Limiter

// RateLimiterByApiKeyByHandler represents the rate limit by each ApiKey for each api calling
func RateLimiterByApiKeyByHandler() gin.HandlerFunc {
// RateLimiterByApiKeyHandler represents the rate limit by each ApiKey for each api calling
func RateLimiterByApiKeyHandler() gin.HandlerFunc {
return func(ctx *gin.Context) {
if exists, current := utils.CurrentUser(ctx); exists {

Expand Down
2 changes: 1 addition & 1 deletion rpc_server/routers/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func generateHandlers() []gin.HandlerFunc {
}
handlers = append(handlers, middlewares.CorsHandler())
handlers = append(handlers, middlewares.AuthHandler())
handlers = append(handlers, middlewares.RateLimiterByApiKeyByHandler())
handlers = append(handlers, middlewares.RateLimiterByApiKeyHandler())
return handlers
}

Expand Down

0 comments on commit 0fea7f9

Please sign in to comment.