Skip to content

Commit

Permalink
feat: 调整登录限流
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Sep 16, 2024
1 parent 0f5e031 commit b5509ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/route/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func Http(r chi.Router) {
r.Route("/api", func(r chi.Router) {
r.Route("/user", func(r chi.Router) {
user := service.NewUserService()
r.With(middleware.Throttle(10, time.Minute)).Post("/login", user.Login)
r.With(middleware.Throttle(5, time.Minute)).Post("/login", user.Login)
r.Post("/logout", user.Logout)
r.Get("/isLogin", user.IsLogin)
r.With(middleware.MustLogin).Get("/info", user.Info)
Expand Down

0 comments on commit b5509ec

Please sign in to comment.