Laravel Api 报错429 Too Many Attempts.

429 Too Many Attempts.

In Laravel, this function is implemented through the built-in throttle middleware, which receives two parameters, the first is the upper limit of the number of times, the second is the specified time period (unit: minutes)
Insert picture description here

  • The first parameter 100 means limit 100 requests per minute
  • The second parameter 1 means that the restriction rule is triggered, and access is prohibited within 1 minute

Modify the first parameter to be larger according to the actual situation, for example: 10000

Cancel the default request frequency limit of the API interface, just comment directly

Guess you like

Origin blog.csdn.net/qq175023117/article/details/107504796