Use $protocol from config instead of $scheme

Deleted references to http and https. Should be handled in HttpSocket.