From ae7ba50a19de93fcbc53eb766d9d68a8d7c7b439 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 22 Apr 2014 16:24:13 +0200 Subject: [PATCH] middleware: only create LTPA cookie on login and homepage --- authentic2_idp_ltpa/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentic2_idp_ltpa/middleware.py b/authentic2_idp_ltpa/middleware.py index 0c10bcb..48bec85 100644 --- a/authentic2_idp_ltpa/middleware.py +++ b/authentic2_idp_ltpa/middleware.py @@ -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