make request.is_secure() work