fix: JWT 用户缓存避免每请求查库 + 移除全 API 限流
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -191,10 +191,7 @@ REST_FRAMEWORK = {
|
||||
'DEFAULT_PERMISSION_CLASSES': (
|
||||
'rest_framework.permissions.IsAuthenticated',
|
||||
),
|
||||
'DEFAULT_THROTTLE_CLASSES': [
|
||||
'rest_framework.throttling.AnonRateThrottle',
|
||||
'rest_framework.throttling.UserRateThrottle',
|
||||
],
|
||||
# 全局限流会作用于每个 API;登录/支付等敏感接口在各自 view 上单独配置了 throttle_classes
|
||||
'DEFAULT_THROTTLE_RATES': {
|
||||
'anon': '100/minute',
|
||||
'user': '1000/minute',
|
||||
|
||||
Reference in New Issue
Block a user