mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-10 23:15:30 +08:00
Merge branch 'main' of github.com:alone-wolf/pushdeer
This commit is contained in:
commit
f31912edae
@ -24,7 +24,7 @@ SESSION_LIFETIME=120
|
|||||||
|
|
||||||
MEMCACHED_HOST=127.0.0.1
|
MEMCACHED_HOST=127.0.0.1
|
||||||
|
|
||||||
REDIS_HOST=127.0.0.1
|
REDIS_HOST=redis
|
||||||
REDIS_PASSWORD=null
|
REDIS_PASSWORD=null
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
protected function configureRateLimiting()
|
protected function configureRateLimiting()
|
||||||
{
|
{
|
||||||
RateLimiter::for('api', function (Request $request) {
|
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());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('CACHE_DRIVER', 'file'),
|
'default' => env('CACHE_DRIVER', 'redis'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user