Permalink
Browse files

[bug 853904] Fix NoCacheHttpsMiddleware to use request.is_secure()

  • Loading branch information...
1 parent d80b2bf commit 7add8acbf4058ad4843dd5644337fec12c1c61ed @rlr rlr committed Mar 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 apps/sumo/middleware.py
View
@@ -92,7 +92,7 @@ class NoCacheHttpsMiddleware(object):
and not equal to 'off'.
"""
def process_response(self, request, response):
- if 'HTTPS' in request.META and request.META['HTTPS'] != 'off':
+ if request.is_secure():
response['Expires'] = 'Thu, 19 Nov 1981 08:52:00 GMT'
response['Cache-Control'] = 'no-cache, must-revalidate'
response['Pragma'] = 'no-cache'

0 comments on commit 7add8ac

Please sign in to comment.