0

I have an app that has a rails backend and react frontend. In Heroku i have two custom domain names one for the front end and one for the backend and both have SSL certificates via Heroku SSL.

In my production.rb file I have

   config.force_ssl = true

But for some reason my app is not redirecting to HTTPS. The app works and everything but it still has the http link thats not secure. I am using react router on my frontend. Does anyone have ideas to why this may not be working? Or have any other ideas on how I can successfully redirect?

rgc998
  • 299
  • 2
  • 15
  • one solution I found was to use react-https-redirect but still cant figure out why force_ssl didn't work – rgc998 Mar 17 '18 at 20:14
  • Is this working now? If not, can you provide any more info about the setup? The front end (react) won't have an impact on this, it's the server that should be responding to http requests with a 301 redirect to https. Does [this question](https://stackoverflow.com/questions/27377386/force-ssl-for-heroku-apps-running-in-eu-region) provide any additional help? It's basically suggesting what you're doing, but has a lot of upvotes. – Charlie Schliesser May 02 '18 at 18:29

0 Answers0