def return_ok_secure(self, cookie, request):
        """Check whether the given cookie is sent to a secure host."""

        is_secure_protocol = super().return_ok_secure(cookie, request)
        if is_secure_protocol:
            return True

        # The original implementation of this method only takes secure protocols
        # (e.g., https) into account, but the latest developments in modern browsers
        # (chrome, firefox) assume 'localhost' is also a secure location. So we
        # override it with our own strategy.
        return self._is_local_host(cookiejar.request_host(request))
Check whether the given cookie is sent to a secure host.
httpie/cookies.py