From d16abb9f8129847cc86c2bb372d99d5f26147b26 Mon Sep 17 00:00:00 2001 From: Ymage Date: Mon, 26 Nov 2018 14:54:20 +0100 Subject: [PATCH] Fix login redirection when submounted Fix #411 to use with APPLICATION_ROOT Flask config variable --- app/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views.py b/app/views.py index 0dfb103..fcdfd2d 100644 --- a/app/views.py +++ b/app/views.py @@ -301,8 +301,8 @@ def saml_authorized(): @login_manager.unauthorized_handler def unauthorized_callback(): - session['next'] = request.path - return redirect('/login') + session['next'] = request.script_root + request.path + return redirect(url_for('login')) @app.route('/login', methods=['GET', 'POST'])