我使用Laravel 10和Laravel Fortify来处理电子邮件验证。当用户注册到我的平台时,会向他们发送一封电子邮件(默认的Laravel电子邮件),其中包含一个链接,将他们带到一个URL,如:
http://localhost:8005/email/verify/23/8f4b1a4a0ea66cfb264bc747d247f9529d7ec3b6?expires=1703525853&signature=81bda2c7c9bf2c8bc9a07ca31c2a1d78620bda407baf1a7d432f169a801d2158
问题是,我一直看到Laravel429 TOO MANY REQUESTS,尽管我的应用程序的速率限制器设置为200/min
/**
* Configure the rate limiters for the application.
*/
protected function configureRateLimiting(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(200)->by($request->user()?->id ?: $request->ip());
});
}
字符串
我在这里到底遗漏了什么?我想允许每分钟更多的电子邮件验证请求。
1条答案
按热度按时间jvlzgdj91#
答案是在Fortify配置文件的
limiters
数组键中设置以下内容:字符串