引入接口频率限制机制
This commit is contained in:
@@ -7,6 +7,7 @@ from applications.common.utils.http import table_api, fail_api, success_api
|
||||
from applications.common.utils.rights import authorize
|
||||
from applications.common.utils.validate import str_escape
|
||||
from applications.extensions import db
|
||||
from applications.extensions.init_limit import limiter
|
||||
from applications.models import Mail
|
||||
from applications.schemas import MailOutSchema
|
||||
from applications.common.utils import mail
|
||||
@@ -24,6 +25,7 @@ def main():
|
||||
|
||||
# 用户分页查询
|
||||
@bp.get('/data')
|
||||
@limiter.limit("60 per minute")
|
||||
@authorize("system:mail:main")
|
||||
def data():
|
||||
# 获取请求参数
|
||||
|
||||
Reference in New Issue
Block a user