修复:心跳限流从 2次/分钟 放宽到 6次/分钟
- 避免聊天室刷新操作触发 Too Many Attempts 错误
This commit is contained in:
+2
-2
@@ -61,9 +61,9 @@ Route::middleware(['chat.auth'])->group(function () {
|
|||||||
// 发送消息
|
// 发送消息
|
||||||
Route::post('/room/{id}/send', [ChatController::class, 'send'])->name('chat.send');
|
Route::post('/room/{id}/send', [ChatController::class, 'send'])->name('chat.send');
|
||||||
|
|
||||||
// 挂机心跳存点 (限制每分钟最多调用 2 次防止挂机脚本当作 DDOS)
|
// 挂机心跳存点 (限制每分钟最多调用 6 次防止挂机脚本滥用)
|
||||||
Route::post('/room/{id}/heartbeat', [ChatController::class, 'heartbeat'])
|
Route::post('/room/{id}/heartbeat', [ChatController::class, 'heartbeat'])
|
||||||
->middleware('throttle:2,1')
|
->middleware('throttle:6,1')
|
||||||
->name('chat.heartbeat');
|
->name('chat.heartbeat');
|
||||||
|
|
||||||
// 退出房间
|
// 退出房间
|
||||||
|
|||||||
Reference in New Issue
Block a user