title: Angular 6 make http use https
body: <p>So, my app is being served by a simple web server, under "<a href="https://localhost:8443/app" rel="noreferrer">https://localhost:8443/app</a>", while the same web server returns json responses under eg. "<a href="https://localhost:8443/api/login" rel="noreferrer">https://localhost:8443/api/login</a>".</p>
  
  <p>TLS is set up with a self signed certificate for now.</p>
  
  <p>when I request the app, I get the certificate warning, which I skip, and then I see my login page.</p>
  
  <p>on clicking the login button, the angular application executes</p>
  
  <pre><code>http.post&lt;LoginResponse&gt;('/api/login', body)
  </code></pre>
  
  <p>which shows up in my browsers network trace as a post request to
  "<a href="http://localhost:8443/api/login" rel="noreferrer">http://localhost:8443/api/login</a>".</p>
  
  <p>I cannot find any info on this, only infos on how to handle tls when running the app with angular-cli.</p>
  
  <p>Why does the app default to http, and where do I tell it to use https?</p>