Allow switch between http and https regarding of passed protocol