引入接口频率限制机制
This commit is contained in:
@@ -5,6 +5,7 @@ from applications.common.utils.http import success_api, fail_api, table_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 Power
|
||||
from applications.schemas import PowerOutSchema2
|
||||
from applications.schemas.admin_power import PowerSchema
|
||||
@@ -19,6 +20,7 @@ def index():
|
||||
|
||||
|
||||
@bp.post('/data')
|
||||
@limiter.limit("60 per minute")
|
||||
@authorize("system:power:main")
|
||||
def data():
|
||||
power = Power.query.all()
|
||||
|
||||
Reference in New Issue
Block a user