title: How to force HTTPS with create-react-app on heroku
body: <p>I'm running a very basic react app on Heroku and would like to force https on the production server, while still running localhost on https. I cannot for the life of me figure out how to do this on Heroku.</p>
  <p>SSL and domain has been setup and works fine when I manually enter https:// before the domain. But if I manually type http:// this also works.</p>
  <p>How do I redirect all http traffic to https for my react app on Heroko. I would like this to happen:</p>
  <ul>
  <li>localhost:3000 still works in development</li>
  <li>https is forced on production domain</li>
  <li>create-react-app still runs without being &quot;ejected&quot;</li>
  </ul>
  <p>Typically I'd set this up on the DNS, but Heroku only allows for a CNAME setup, so I cannot do this on the DNS level. I assume a custom server is required like express, but I cannot find any documentation on how to do this for production while stille working normally in development/localhost.</p>