Specify elasticsearch path on frontend. Allow for SSL proxies. 

This ensures we use the same protocol to talk to the backend that the front end was served from. Closes #1772