Adapt to HTTPS scheme