support for multiple protocol

setting config.js to set the protocol based on the current url.  this means when https support is added and accessed by the users browser the elasticsearch proxying will work through it.