Skip to content

Commit

Permalink
Merge pull request #57 from wuzhihui1123/master
Browse files Browse the repository at this point in the history
 next vaule: Priority use request.full_path
  • Loading branch information
AdmiralObvious authored Jul 14, 2019
2 parents d69968d + 4337d94 commit 6f5e15e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flask_simpleldap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def login_required(func):
def wrapped(*args, **kwargs):
if g.user is None:
return redirect(url_for(current_app.config['LDAP_LOGIN_VIEW'],
next=request.path))
next=request.full_path or request.path))
return func(*args, **kwargs)

return wrapped
Expand All @@ -330,7 +330,7 @@ def wrapped(*args, **kwargs):
if g.user is None:
return redirect(
url_for(current_app.config['LDAP_LOGIN_VIEW'],
next=request.path))
next=request.full_path or request.path))
match = [group for group in groups if group in g.ldap_groups]
if not match:
abort(401)
Expand Down

0 comments on commit 6f5e15e

Please sign in to comment.