title: Get Web hostname in Startup
body: <p>I've been searching for a way to get the hostname of the web application in the Startup class of my asp.net core 2.0 app.  Specifically, in the Configure method I would like to dynamically set a service property based on the hostname.<br>
  For instance, I need to know if the host is running as <a href="http://servername/myapp" rel="nofollow noreferrer">http://servername/myapp</a>  or <a href="https://externalhost.com/myapp" rel="nofollow noreferrer">https://externalhost.com/myapp</a></p>
  
  <p>Thank you for any help</p>