This commit is contained in:
2026-04-26 14:04:24 +03:00
parent 9a10f30634
commit 10ea1f03cd
3 changed files with 18 additions and 1 deletions

View File

@@ -319,6 +319,15 @@ def create_app():
return {'error': 'not found'}, e.code
else:
return render_template('common/404.html'), e.code
@app.errorhandler(403)
def _handle_403(e):
if request.path.startswith('/hyperapi/'):
return '<h1>forbiddedn</h1>', e.code
elif request.path.startswith('/api/'):
return {'error': 'forbidden'}, e.code
else:
return render_template('common/403.html'), e.code
#
# @app.errorhandler(413)
# def _handle_413(e):