Added redirect on 401 Unauthorized
This commit is contained in:
parent
f2e0be83b9
commit
6fa0ea598c
1 changed files with 5 additions and 1 deletions
4
login.py
4
login.py
|
@ -13,6 +13,10 @@ def load_user(userid):
|
|||
return User.query.filter_by(id=userid).first()
|
||||
|
||||
|
||||
@app.errorhandler(401)
|
||||
def custom_401(_):
|
||||
return redirect(url_for('login'))
|
||||
|
||||
@app.route('/login')
|
||||
def login():
|
||||
return zeus_login()
|
||||
|
|
Loading…
Reference in a new issue