from django.conf import settings class cookie_httponly: def process_response(self, request, response): if response.cookies.has_key(settings.SESSION_COOKIE_NAME): response.cookies[settings.SESSION_COOKIE_NAME]['httponly'] = True return response