update to support HTTPS and protocol-relative URLs