From db8868ce854d1d918fca1e631f92c50c3f7bf9f6 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 22 Apr 2014 14:28:39 +0200 Subject: [PATCH] middleware: do not add the LTPA token if in a logout URL --- authentic2_idp_ltpa/middleware.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentic2_idp_ltpa/middleware.py b/authentic2_idp_ltpa/middleware.py index af499c1..0c10bcb 100644 --- a/authentic2_idp_ltpa/middleware.py +++ b/authentic2_idp_ltpa/middleware.py @@ -2,6 +2,7 @@ from . import views class LTPAMiddleware(object): def process_response(self, request, response): - views.add_ltpa_token_to_response(request, response) + if not 'logout' in request.path: + views.add_ltpa_token_to_response(request, response) return response