Home > Software design >  My rails app works on a Heroku domain but not on a specific domain
My rails app works on a Heroku domain but not on a specific domain

Time:01-18

I have a Rails app on Heroku, with postgresql, that works fine on a Heroku domain:

my-app.herokuapp.com

But not on a specific domain:

my-app.com

It works until I try to submit a form and an error pops up:

"The change you wanted was rejected. Maybe you tried to change something you didn't have access to."

I thought the problem could be about postgresql, and I tryed this:

rails db:create

But I receive another error:

"Couldn't create 'myapp_development' database. Please check your configuration."

Edit 1 with more details: I'm using Cloudflare. My database.yml file is like this: /config/database.yml.tmp

CodePudding user response:

I solved it doing this:

  1. In production.rb setting config.force_ssl = false
  2. In Cloudflare setting SSL/TLS encryption mode from Flexible to Full
  • Related