mirror of
https://github.com/easychen/pushdeer.git
synced 2024-10-31 23:59:20 +08:00
更新API限制策略
This commit is contained in:
parent
52b5044141
commit
d6a4517018
@ -57,7 +57,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||
return Limit::perMinute(60)->by(uid() ?: $request->ip());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user