diff --git a/common/constants.go b/common/constants.go index e4985241ac..64e587488d 100644 --- a/common/constants.go +++ b/common/constants.go @@ -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 diff --git a/router/relay-router.go b/router/relay-router.go index d8cd9e64e4..585af78a6a 100644 --- a/router/relay-router.go +++ b/router/relay-router.go @@ -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) }