# HG changeset patch # User durandn # Date 1455722044 -3600 # Node ID 8bc8b208441da07ed0a9ff8d7e7e857d3b36b3e2 # Parent 3f52a017e6f59ee3c7da202e9009606128d57350 corrected middleware to allow proper redirects diff -r 3f52a017e6f5 -r 8bc8b208441d server/src/metaeducation/middleware.py --- a/server/src/metaeducation/middleware.py Wed Feb 17 11:25:20 2016 +0100 +++ b/server/src/metaeducation/middleware.py Wed Feb 17 16:14:04 2016 +0100 @@ -18,6 +18,5 @@ if request.GET.get("context", ""): context = request.GET["context"] response = redirect(settings.LOGIN_URL) - response["LOCATION"] += "?"+urlencode({"context": context}) - print(response["LOCATION"]) + response["LOCATION"] += "?"+urlencode({"context": context, "next": "/"+path}) return response