middleware: only create LTPA cookie on login and homepage

This commit is contained in:
Benjamin Dauvergne 2014-04-22 16:24:13 +02:00
parent e14ef39ed8
commit ae7ba50a19
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ from . import views
class LTPAMiddleware(object):
def process_response(self, request, response):
if not 'logout' in request.path:
if request.path == '/' or request.path == '/login/':
views.add_ltpa_token_to_response(request, response)
return response