Setup ssl on connection only when url has https scheme