Skip to content

Commit

Permalink
fix: remove rate limit for relay api
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Apr 26, 2023
1 parent b9cc5df commit fd149c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var (
// All duration's unit is seconds
// Shouldn't larger then RateLimitKeyExpirationDuration
var (
GlobalApiRateLimitNum = 60000 // TODO: temporary set to 60000
GlobalApiRateLimitNum = 180
GlobalApiRateLimitDuration int64 = 3 * 60

GlobalWebRateLimitNum = 60
Expand Down
4 changes: 2 additions & 2 deletions router/relay-router.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

func SetRelayRouter(router *gin.Engine) {
relayV1Router := router.Group("/v1")
relayV1Router.Use(middleware.GlobalAPIRateLimit(), middleware.TokenAuth(), middleware.Distribute())
relayV1Router.Use(middleware.TokenAuth(), middleware.Distribute())
{
relayV1Router.Any("/*path", controller.Relay)
}
relayDashboardRouter := router.Group("/dashboard")
relayDashboardRouter.Use(middleware.GlobalAPIRateLimit(), middleware.TokenAuth(), middleware.Distribute())
relayDashboardRouter.Use(middleware.TokenAuth(), middleware.Distribute())
{
relayDashboardRouter.Any("/*path", controller.Relay)
}
Expand Down

0 comments on commit fd149c2

Please sign in to comment.