Default to same port as request for elasticsearch server
Add missing include
Use scheme relative URL to support dashboards over ssl.