每当我关闭服务器并再次打开并尝试使用以前的令牌访问路由而不登录应用程序时,它会给我 500 内部服务器错误而不是“身份验证失败”。有什么解决方案。
@app.route('/secret_page', methods=['GET'])
@jwt_required
def secret_page():
print "secret page"
return jsonify({'Success': True})
错误是
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>