update only if scheme == https

sometimes on a malformed URL like example.com:5000/example sets
'example.com' as the URL scheme, which is incorrect.