feat(admin): 新增限流器 add rate limiting middleware for backend
- Add rate limiting functionality to the admin panel - Implement rate limiting middleware to control API request frequency - Update login controller to use rate limiting Add helper functions for getting IP and admin UID - Update route configuration to include rate limiting middleware - Add Redis configuration to .env file - Update composer.json to include rate limiting package dependency
This commit is contained in:
10
.example.env
10
.example.env
@@ -14,6 +14,16 @@ DB_PORT=3306
|
||||
DB_CHARSET=utf8mb4
|
||||
DB_PREFIX=ea8_
|
||||
|
||||
# 限流器开关
|
||||
RATE_LIMITING_STATUS=false
|
||||
|
||||
# Redis配置
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=
|
||||
REDIS_PREFIX=
|
||||
REDIS_DATABASE=0
|
||||
|
||||
# 后台配置项组
|
||||
[EASYADMIN]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user