use config.protocol instead of hardcoded http