Auto detect http/https