I'm testing a CDN and I'm struggling to get the path helpers to redirect to the correct domain.
In my users_controller.rb create action, I've got:
redirect_to users_path(new_user_id: @user.id), notice: I18n.t('users.create.successfully_created')
My development.rb environment has both of these set:
config.action_mailer.default_url_options = { host: 'research.example.com.global.prod.fastly.net' }
Rails.application.routes.default_url_options[:host] = 'research.example.com.global.prod.fastly.net'
and my .env has this set:
APP_DOMAIN=research.example.com.global.prod.fastly.net
So it should redirect to http://research.example.com.global.prod.fastly.net/users?new_user_id=16
But after all that configuration, I'm getting redirected to https://www.example.com/users?new_user_id=16 or something similar for every action in the app.
So either something's not updating (I've restarted the server multiple times), or I'm missing/misunderstanding something. How do you set the domain/subdomain for your url helpers?