feat(api): 新增 CSRF 校验
This commit is contained in:
@@ -10,6 +10,10 @@ def init_error_views(app):
|
||||
def page_not_found(e):
|
||||
return render_template('errors/404.html'), 404
|
||||
|
||||
@app.errorhandler(405)
|
||||
def page_not_found(e):
|
||||
return render_template('errors/404.html'), 404
|
||||
|
||||
@app.errorhandler(500)
|
||||
def internal_server_error(e):
|
||||
return render_template('errors/500.html'), 500
|
||||
@@ -18,4 +22,4 @@ def init_error_views(app):
|
||||
def ratelimit_exceeded(e):
|
||||
return jsonify(
|
||||
success=False, msg="请求频率超限,请稍后再试。"
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user