1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-26 10:00:37 +00:00

Fix login/logout redirect with reverse proxy

This commit is contained in:
janeczku 2016-07-15 14:29:57 +02:00
parent f95ac38c54
commit d051a1dbeb

View File

@ -79,9 +79,9 @@
<li><a href="{{url_for('user_list')}}"><span class="glyphicon glyphicon-dashboard"></span> Admin</a></li> <li><a href="{{url_for('user_list')}}"><span class="glyphicon glyphicon-dashboard"></span> Admin</a></li>
{% endif %} {% endif %}
<li><a href="{{url_for('profile')}}"><span class="glyphicon glyphicon-user"></span> {{g.user.nickname}}</a></li> <li><a href="{{url_for('profile')}}"><span class="glyphicon glyphicon-user"></span> {{g.user.nickname}}</a></li>
<li><a href="{{url_for('logout', next=request.path)}}"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> <li><a href="{{url_for('logout', next='%s%s' % (request.script_root, request.path))}}"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
{% else %} {% else %}
<li><a href="{{url_for('login', next=request.path)}}"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> <li><a href="{{url_for('login', next='%s%s' % (request.script_root, request.path))}}"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
{% if g.allow_registration %} {% if g.allow_registration %}
<li><a href="{{url_for('register')}}"><span class="glyphicon glyphicon-user"></span> Register</a></li> <li><a href="{{url_for('register')}}"><span class="glyphicon glyphicon-user"></span> Register</a></li>
{% endif %} {% endif %}